WiX error on build server

I have a project that uses WiX. It works fine on my local machine, but when I publish to the build server, the build will explode as follows.

From MSBuild Magazine

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)

I have Wix 3.6 installed on the build server, and the account running tfs build is listed in the domain administrators group.

+5
source share
2 answers

In fact, the problem was due to an architecture error. One of the projects compiles only on x86, so to use x86 it was necessary to change buildserver.

Edit Build, Process, MSBuildPlatform X86

+6
source

Try running the command in double quotes

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

The MS compilation may have problems with paths that have spaces.

0

All Articles