6

我有一个使用 WiX 的项目。它在我的本地机器上运行良好,但是当我发布到构建服务器时,构建会出现以下问题。

从 MSBuild 日志

Using "HeatDirectory" task from assembly "C:\Program Files (x86)\WiX Toolset v3.6\bin\\WixTasks.dll".
Task "HeatDirectory"
  Command:
  C:\Program Files (x86)\WiX Toolset v3.6\bin\Heat.exe dir "C:\Builds\3\Project\Foo Bar - CI\Sources\Company.Foobar.UI\obj\BuildServer\Package\PackageTmp\\" -cg Company.Foobar.UI_Project -dr INSTALLLOCATION -scom -sreg -srd -var var.WebServiceProjectDir -ag -sfrag -out web\Company.Foobar.UI.wxs
  Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.6\bin\Heat.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format.
     at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
     at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
     at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
     at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
     at System.Reflection.Assembly.LoadFrom(String assemblyFile)
     at Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object parameters)

我在构建服务器上安装了 Wix 3.6,并且运行 tfs build 的帐户列在域管理员组中。

4

2 回答 2

7

实际上,问题完全与架构不匹配有关。其中一个项目仅在 x86 中编译,因此必须更改构建服务器以使用 x86。

编辑构建、处理、MSBuildPlatform X86

于 2013-02-27T08:43:15.970 回答
0

尝试将您的命令用双引号引起来

"C:\Program Files (x86)\WiX Toolset v3.6\bin\Heat.exe"

MS build 中包含空格的路径可能会出现问题。

于 2013-02-26T18:26:38.553 回答