msbuild - WIX 3.5 在 NAnt 下失败,但在 VS2010 下则不然

标签 msbuild wix nant wix3.5 votive

我知道这是一个常见问题,但我在论坛中找到的所有内容似乎都与 64 位框架不兼容有关(这对我来说不是问题)。

我有一组使用 Votive 开发的简单 WIX 3.5 安装程序,我可以在 VS2010 中愉快地编译它们,但是当我尝试通过 TeamCity 上的 NAnt(和 MSBuild)编译它们时(即 TeamCity -> Nant -> MSBuild -> WIX) )我收到以下错误:

 [exec] Project file contains ToolsVersion="4.0", which is not supported by this 
            version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
 [exec] Compile:
 [exec]   Microsoft (R) Windows Installer Xml Compiler version 3.5.2006.0
 [exec]   Copyright (C) Microsoft Corporation. All rights reserved.
 [exec]
 [exec]   Product.wxs
 [exec]   Product.Generated.wxs
 [exec] Link:
 [exec]   Microsoft (R) Windows Installer Xml Linker version 3.5.2006.0
 [exec]   Copyright (C) Microsoft Corporation. All rights reserved.
 [exec]
 [exec] light.exe : error LGHT0001: Unable to load DLL 'winterop.dll': The specified module 
           could not be found. (Exception from HRESULT: 0x8007007E)
 [exec]
 [exec]   Exception Type: System.DllNotFoundException
 [exec]
 [exec]   Stack Trace:
 [exec]      at Microsoft.Tools.WindowsInstallerXml.Cab.Interop.NativeMethods.ExtractCabBegin()
 [exec]      at Microsoft.Tools.WindowsInstallerXml.Binder.BindDatabase(Output output, String databaseFile)
 [exec]      at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output, String file)
 [exec]      at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
 [exec] Done Building Project "c:\dev2\ad3\utilities\Installers\Database\Database.wixproj" (default targets) -- FAILED.
 [exec] Done Building Project "c:\dev2\ad3\AgentDesktop3.1.sln" (default targets) -- FAILED.
 [exec]
 [exec] Build FAILED.
 [exec]
 [exec] "c:\dev2\ad3\AgentDesktop3.1.sln" (default target) (1) ->
 [exec] "c:\dev2\ad3\utilities\InstallerService\InstallerService.csproj" (default target) (5) ->
 [exec] (ResolveAssemblyReferences target) ->
 [exec]   C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets
            : warning MSB3088: Could not read state file
            "obj\Release\ResolveAssemblyReference.cache". Unable to find assembly
            'Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral,
            PublicKeyToken=b03f5f7f11d50a3a'.
 [exec]
 [exec]
 [exec] "c:\dev2\ad3\AgentDesktop3.1.sln" (default target) (1) ->
 [exec] "c:\dev2\ad3\utilities\Installers\Database\Database.wixproj" (default target) (6) ->
 [exec] (Link target) ->
 [exec]   light.exe : error LGHT0001: Unable to load DLL 'winterop.dll': The specified 
              module could not be found. (Exception from HRESULT: 0x8007007E)
 [exec]
 [exec]     1 Warning(s)
 [exec]     1 Error(s)
 [exec]
 [exec] Time Elapsed 00:00:05.92

 BUILD FAILED

有什么想法吗?

最佳答案

我们在使用 Team Build (2010) 进行构建时遇到了类似的问题。我们最终在我们的一个构建代理上为 Winterop.dll 做了一个 filemon(现在称为 processmonitor),以查看它的预期位置。

我们最终在路径中添加了wix安装的bin文件夹,突然发现了winterop.dll。

关于msbuild - WIX 3.5 在 NAnt 下失败,但在 VS2010 下则不然,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3508239/

相关文章:

c++ - 建立时间: Visual Studio 2015-2017 build very slow [closed]

asp.net - Web部署项目AfterBuild路径问题

c# - 在 x86 中编译引用 C++/CLI DLL 的 C# 项目时,MSBuild 无法生成

Wix - 根据单选按钮有条件地安装功能

未找到 NANT 0.92 SDK 7

c# - 使用 NUnit 2.5.x 和 .Net 4.0 持续集成/构建

南特 : change file permission

c++ - 错误 MSB6006 : "cmd.exe" with Code 9009; command "C:\Program"

c# - 检查是否成功卸载

wix - 为什么 Windows Installer 在删除过程中不使用 .msi 文件中的 UI?