转换为VS2008后,MSI的行为有所不同

时间:2021-08-18 17:28:44

After converting the solution to vs2008 from 2005, my msi started behaving differently.

从2005年将解决方案转换为vs2008后,我的msi开始表现不同。

Not all the dlls get ovewritten and if I launch the msi from another process (with createProcess) it fails (saying smt like 'a package returned an unexpected value') and the installation rolls back.

并非所有的dll都被写入了,如果我从另一个进程启动msi(使用createProcess)它会失败(说smt就像'一个包返回了一个意外的值')并且安装回滚。

I understand this is kind of a common problem and solutions are:

我知道这是一个常见的问题,解决方案是:

  1. mark dlls that are being packaged with a * on the version (i.e. x.x.*)
  2. 标记在版本上打包*的dll(即x.x. *)

  3. increase the version number of the msi to force an ovewrite
  4. 增加msi的版本号以强制执行ovewrite

I tried with solution 2 but to my surprise I get all sorts of build errors when I build with devenv (I use devenv on cruise control, all good with msbuild from within visual studio).

我尝试使用解决方案2,但令我惊讶的是,当我使用devenv构建时,我会遇到各种构建错误(我在巡航控制中使用devenv,在视觉工作室中使用msbuild都很好)。

Now I am gonna try with solution 1 - but I'd appreciate any suggestion/ideas for alternative solutions.

现在我将尝试解决方案1 ​​ - 但我很欣赏任何有关替代解决方案的建议/想法。

1 个解决方案

#1


A starting point would be understanding why it's behaving differently, perhaps you could try Verbose Logging (grabbed from Wikipedia's Windows Installer entry):

一个起点是理解它为什么表现不同,也许你可以尝试详细记录(从*的Windows Installer条目中获取):

  • Command-line: If installing an MSI package from the command-line, the /L switch can be used to enable logging. For example, the following command installs Package.msi and outputs verbose logging to c:\Package.log:

    命令行:如果从命令行安装MSI软件包,则可以使用/ L开关启用日志记录。例如,以下命令安装Package.msi并将详细日志记录输出到c:\ Package.log:

    msiexec /i Package.msi /l*v c:\Package.log
    
  • Windows Registry: The following registry value can be used to enable verbose logging:

    Windows注册表:以下注册表值可用于启用详细日志记录:

    Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
    Value Name: Logging
    Type: REG_SZ
    Data: voicewarmupx
    

Other things worth trying:

其他值得尝试的事情:

  • Compare a copy of the Installer project file from before conversion to one after conversion to see if Visual Studio has "borked" something in it unexpectedly
  • 将转换前的安装程序项目文件的副本与转换后的安装程序项目文件的副本进行比较,以查看Visual Studio是否意外地“堵塞”了某些内容

  • Are you calling CreateProcess with an unusal StartupInfo or other parameter?
  • 您是否使用不常的StartupInfo或其他参数调用CreateProcess?

#1


A starting point would be understanding why it's behaving differently, perhaps you could try Verbose Logging (grabbed from Wikipedia's Windows Installer entry):

一个起点是理解它为什么表现不同,也许你可以尝试详细记录(从*的Windows Installer条目中获取):

  • Command-line: If installing an MSI package from the command-line, the /L switch can be used to enable logging. For example, the following command installs Package.msi and outputs verbose logging to c:\Package.log:

    命令行:如果从命令行安装MSI软件包,则可以使用/ L开关启用日志记录。例如,以下命令安装Package.msi并将详细日志记录输出到c:\ Package.log:

    msiexec /i Package.msi /l*v c:\Package.log
    
  • Windows Registry: The following registry value can be used to enable verbose logging:

    Windows注册表:以下注册表值可用于启用详细日志记录:

    Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
    Value Name: Logging
    Type: REG_SZ
    Data: voicewarmupx
    

Other things worth trying:

其他值得尝试的事情:

  • Compare a copy of the Installer project file from before conversion to one after conversion to see if Visual Studio has "borked" something in it unexpectedly
  • 将转换前的安装程序项目文件的副本与转换后的安装程序项目文件的副本进行比较,以查看Visual Studio是否意外地“堵塞”了某些内容

  • Are you calling CreateProcess with an unusal StartupInfo or other parameter?
  • 您是否使用不常的StartupInfo或其他参数调用CreateProcess?