我在我的*.wixproj文件中使用HeatDirectory任务,该文件在我的机器上工作得非常好,在本地构建.
但是,在TFS上,它失败并出现以下错误:
C:\ Program Files(x86)\ WiX Toolset v3.8\bin\Heat.exe dir D:\ Builds\32\48\bin\Debug\InstallSrc\WebApp\-cg CompGrp_WebApp -dr WebApp -ke -scom -sreg -srd -var var.WebAppSrc -v -ag -sfrag -suid -out WebApp_.wxs无法加载文件或程序集'file:/// C:\ Program Files(x86)\ WiX Toolset v3.8\bin\Heat .exe'或其依赖项之一.尝试加载格式不正确的程序.在System.Reflection.RuntimeAssembly上.nLoad(AssemblyName fileName,String codeBase,Evidence assemblySecurity,RuntimeAssembly locationHint,StackCrawlMark&stackMark,IntPtr pPrivHostBinder,Boolean throwOnFileNotFound,Boolean forIntrospection,Boolean suppressSecurityChecks)System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef,Evidence assemblySecurity,RuntimeAssembly reqAssembly,StackCrawlMark&stackMark,在System.Reflection.RuntimeAssembly.InternalLoadFrom的System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef,Evidence assemblySecurity,RuntimeAssembly reqAssembly,StackCrawlMark&stackMark,Boolean throwOnFileNotFound,Boolean forIntrospection,Boolean suppressSecurityChecks)中的IntPtr pPrivHostBinder,Boolean throwOnFileNotFound,Boolean forIntrospection,Boolean suppressSecurityChecks) (String assemblyFile,Evidence securityEvidence,Byte [] hashValue,AssemblyHashAlgorithm hashAlgorithm,Boolean forIntrospection,Boolean suppressSecurityChecks,Stac kCrawlMark和stackMark)在System.Reflection.Assembly.LoadFrom(String assemblyFile)at Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object parameters)0> MSBUILD:error MSB4166:子节点"3"过早退出.关机 诊断信息可以在名为MSBuild*.failure.txt 的临时文件目录中的文件中找到.
但是,在同一个构建机器上,我尝试执行热命令行(由上面的日志生成)并使其正常工作:即C:\ Program Files(x86)\ WiX Toolset v3.8\bin\Heat.exe目录D:\Builds\32\48\bin\Debug\InstallSrc\WebApp\-cg CompGrp_WebApp -dr WebApp -ke -scom -sreg -srd -var var.WebAppSrc -v -ag -sfrag -suid -out WebApp_.wxs
我甚至尝试过,通过在TFS定义中禁用MsBuild Multi-Proc(并行构建项目),但是徒劳无功.
为什么它在TFS上失败,而不是在本地失败?
谢谢一堆......
我对Wix-User的邮件组得到了很好的回复.基本上是MsBuild平台问题.它是Auto,需要设置为x86.由于我的解决方案是构建x64项目,因此MsBuild处于x64模式,但是heat.exe不是,因此MsBuild会在日志中显示此消息(如上面的原始帖子中所示)
无法加载文件或程序集'file:/// C:\ Program Files(x86)\ WiX Toolset v3.8\bin\Heat.exe'或其依赖项之一.尝试加载格式不正确的程序
因此,将Auto更改为x86即
TFS - > Edit Build Definition - > Process - > Advanced - > MSBuild Platform = X86.
希望这有助于其他人面临同样的问题

| 归档时间: |
|
| 查看次数: |
2544 次 |
| 最近记录: |