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 ビルドを実行しているアカウントがドメイン管理者グループにリストされています。