visual-studio - (Wix) heat.exe 无法用 msbuild 加载

标签 visual-studio msbuild wix windows-installer heat

我有问题 heat.exe一旦我在 MSBuild 中构建我的项目.我收到此错误消息:

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.11\bin\Heat.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format.



我在这里查找了有关 stackoverflow 的可能解决方案:
Referred links

我尝试以各种方式更改我的配置,但无法掌握缺少的内容。

这就是我现在配置的方式。我希望能够同时针对 x64 和 x86 平台。
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>..\..\BuildArtifacts\SetupProjects\Myproject</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>..\..\BuildArtifacts\SetupProjects\Myproject</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Release</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>..\..\BuildArtifacts\SetupProjects\Myproject</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\BuildArtifacts\SetupProjects\Myproject</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Release</DefineConstants>
</PropertyGroup>

任何帮助表示赞赏,

最佳答案

更新 :在 WiX 的问题数据库中似乎有一个已解决的问题,您应该首先查看它。 请检查问题描述是否让人想起您的经历 :https://github.com/wixtoolset/issues/issues/2467

似乎与有关64 位 MSBuild - 异常(exception)情况与您描述的相同。也许从下往上阅读评论 - 底部最近有一条评论来自 2017 年。

我天真的第一个想法是您是否可以运行 32 位 MSBuild? (我对此知之甚少)。或者如链接问题的底部评论中所述,将可执行文件作为外部进程运行?

旧答案 : 想到的第一件事:相信heat.exe 64 位 COM 文件有问题。你的项目中有这些吗?只是提到它,可能还有另一个原因(也是)。如果可能的话,也许可以尝试通过删除 COM 文件并运行构建来进行测试。

我相信这个问题仍然存在。我对此知之甚少,但我被告知 FireGiant 的商业套件(换句话说,不是免费的)可以处理 64 位文件的高级收集。

关于visual-studio - (Wix) heat.exe 无法用 msbuild 加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49981194/

相关文章:

build - msbuild 不会将引用的 native 项目的输出复制到 c# 项目输出目录

visual-studio - 如何从Windows 7计算机在Visual Studio 2015上安装和使用构建工具v120(2013)?

msbuild - 不要从 TFS 2012 构建定义中的某些程序集运行单元测试

visual-studio-2008 - Wix 不会删除 VS 2008 中卸载时的快捷方式

wix - 用户配置文件的每台机器安装问题

Wix:如何警告用户而不是使用属性终止安装?

windows - 锁定项目

visual-studio - 调试经典 ASP 会导致 Visual Studio 2008 崩溃 - 我该如何解决这个问题?

c++ - 从 c/c++ 应用程序确定 32 位操作系统或 64 位操作系统

visual-studio - 如何将控件叠加到Visual Studio代码图面上