构建服务器上的WiX失败

时间:2013-02-26 16:14:36

标签: wix

我有一个使用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的帐户。

2 个答案:

答案 0 :(得分:7)

实际上这个问题与架构错误无关。其中一个项目只在x86中编译,因此必须将buildserver更改为使用x86。

编辑构建,处理,MSBuildPlatform X86

答案 1 :(得分:0)

尝试用双引号

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

MS build可能会遇到包含空格的路径的问题。

相关问题