修复应用程序 (msi) 失败但正常安装成功

Repair of application (msi) fails but normal installation is successfull

有 VS 2010 创建的 Web 安装项目,当我安装这个项目时一切正常,但是当我检查 "repair" 选项时,我在安装过程中出错。

MSI 日志文件

Running process 'c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn ""' silently...
Process Call Result Code: '0' Process Exit Code: '1'.
The error indicates that IIS is in 32 bit mode, while this application is a 64 bit application and thus not compatible.
Trying 32 bit version of 'aspnet_regiis.exe'...
Reading registry value Path from key 'HKLM\Software\Microsoft\ASP.NET.0.30319.0'...
RESULT Path =
Running process 'c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn ""' silently...
Process Call Result Code: '0' Process Exit Code: '1'.
The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.

我不明白为什么 aspnet_regiis 的 32 位和 64 位版本都与应用程序不兼容?

当我选中 "setup" 而不是 "repair" 选项时,路径参数设置为我的应用程序并且设置工作正常,所以也许我必须更改我的设置项目中的某些内容?

IIS6顺便设置为64位模式;)

谢谢

如果您支持 32 位和 64 位系统,则需要为两者单独设置。

http://blogs.msdn.com/b/heaths/archive/2008/01/15/different-packages-are-required-for-different-processor-architectures.aspx

所以你会 运行 适合系统的 aspnet exe,这可能会解决一些问题。您还没有说您的设置是 x86 还是 x64,因此很难说出确切的问题可能是什么。 32 位进程无法调用 64 位 Dll(反之亦然),因此 32 位 aspnet_regiis.exe 无法在 64 位 IIS 中调用 64 位程序集,这可能与此有关。

这看起来不像 MSI 日志文件,因为它没有包含所有信息,例如 MSI (s) (74:1C) [12:14:05:000]:类型介绍,加上后缀,它会告诉您是否正在重定向对 ProgramFiles 文件夹的调用(在日志中查找 WIN64DUALFOLDERS)。