如何修复 WiX 3.5.1811.0 的 HEAT5301 错误

发布于 2024-09-08 18:04:40 字数 684 浏览 6 评论 0原文

我的项目过去使用 WiX 3.0 构建得很好,现在失败了

heat.exe:错误 HEAT5301:项目输出组无效:Binaries3bSources3bSatellites%3bDocuments。

我在 wix.targets 文件中找到了这个 ProjectOutputGroup,但它看起来像这样:

<CreateItem 
  Include="@(_MSBuildProjectReferenceExistent)" 
  Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' " 
  AdditionalMetadata="ProjectOutputGroups=Binaries%3BSymbols%3BSources%3BContent%3BSatellites%3BDocuments;GenerateType=payloadgroup;HeatOutput=$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs">
  <!-- ... -->
</CreateItem>

看起来前 2 个值的 % 被丢弃,但最后一个值仍然存在。

My project, which used to build fine with WiX 3.0, now fails with

heat.exe : error HEAT5301: Invalid project output group: Binaries3bSources3bSatellites%3bDocuments.

I found this ProjectOutputGroup in the wix.targets file but it looks like this:

<CreateItem 
  Include="@(_MSBuildProjectReferenceExistent)" 
  Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' " 
  AdditionalMetadata="ProjectOutputGroups=Binaries%3BSymbols%3BSources%3BContent%3BSatellites%3BDocuments;GenerateType=payloadgroup;HeatOutput=$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs">
  <!-- ... -->
</CreateItem>

It looks like the % is being discarded for the first 2 values, but is still present for the last one.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

北凤男飞 2024-09-15 18:04:40

我们在从 WiX 3.0 升级到 WiX 3.5.x 的 WiX 项目之一(在 Visual Studio 2008 解决方案下)中遇到了相同的错误。此外,该问题仅发生在 TFS 2010 构建服务器上。使用 Visual Studio 构建桌面效果很好。

我们的 WiX 安装项目与一堆 C# 类库位于同一解决方案中 - 它基本上是一个库安装程序。 WiX 项目具有每个 C# 库的项目引用,我们使用“$(var.MyLibrary1.TargetDir)\MyLibrary.dll”语法来引用 WiX 脚本中的文件。

DoNotHarvest 没有为我们解决问题。

我们通过从 WiX 安装项目中删除然后重新添加所有 C# 库引用来解决这个问题。

We were getting the same error in one of our WiX projects (under Visual Studio 2008 solution) that was upgraded from WiX 3.0 to WiX 3.5.x. Also the problem only happened on the TFS 2010 build server. Desktop build with Visual Studio was fine.

Our WiX setup project is in the same solution with a bunch of C# class libraries - it's basically a library installer. The WiX project has project reference for each of the C# libraries and we use "$(var.MyLibrary1.TargetDir)\MyLibrary.dll" syntax to refer to the files in our WiX scripts.

DoNotHarvest didn't fix the problem for us.

We got around the problem by removing and then re-adding all the C# library references from the WiX setup project.

剪不断理还乱 2024-09-15 18:04:40

将工具版本设置为 4.0 对我有用:

更改:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

到:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

Setting the toolsversion to 4.0 worked for me:

Change:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

To:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
鲜血染红嫁衣 2024-09-15 18:04:40

重新添加受影响的 WiX 项目中的所有引用解决了这个问题,对我来说也是如此。
除此之外,属性

<DoNotHarvest>True</DoNotHarvest> 

被添加到每个引用中,显然这就是解决方案。

Re-adding all references in affected WiX Projects solves the issue, for me too.
Among other things, the property

<DoNotHarvest>True</DoNotHarvest> 

is added to each reference, and obviously this is the solution.

不交电费瞎发啥光 2024-09-15 18:04:40

我从命令行运行热量。所以上面提到的事情对我根本没有帮助。最初我的配置如下:

heat.exe project "project.csproj" -cg GroupName -gg –out "C:\OutPutLocation.wxs"

产生以下错误:heat.exe:错误HEAT5302:未指定项目输出组。

我将其更改为添加-pog开关,还添加了 -configuration-platform 开关。

heat.exe project "project.csproj" -cg Portals.Vendor -gg -pog Binaries -pog Content –configuration "release" -platform "AnyCPU" –out "C:\OutPutLocation.wxs"

顺便说一句:我正在为 VS 2010 .NET 4.0 项目运行 WIX 3.7. 版本。

以防万一您需要 3.x 的开关命令参考:

http://wix.sourceforge.net/manual-wix3/heat.htm

I was running the heat from the command line. So the things mentioned above didn't help me at all. Originally my configuration looked like:

heat.exe project "project.csproj" -cg GroupName -gg –out "C:\OutPutLocation.wxs"

That produced the following error: heat.exe: error HEAT5302 : No project output group specified.

I changed it to add in the -pog switches, also added the -configuration and -platform switches.

heat.exe project "project.csproj" -cg Portals.Vendor -gg -pog Binaries -pog Content –configuration "release" -platform "AnyCPU" –out "C:\OutPutLocation.wxs"

BTW: I'm running version WIX 3.7. for VS 2010 .NET 4.0 project.

Just in case you need the reference for the switch commands for 3.x:

http://wix.sourceforge.net/manual-wix3/heat.htm

毁虫ゝ 2024-09-15 18:04:40

这对我来说不起作用,相反,我必须编辑 wix.targets 文件以删除 Harvest 的额外目录...幸运的是,我当前没有使用 HEAT。进行更改后,我能够在我们的构建服务器上再次构建。

有趣的是,这并没有影响我们在台式计算机上通过 Visual Studio 进行构建。

That did not work for me, instead, I had to edit the wix.targets file to remove the extra directories for the Harvest... Fortunately, I am not currently using HEAT. After I made that change, I was able to build again on our build server.

Interestingly, this did not see to affect building from within Visual Studio on our desktop computers.

裂开嘴轻声笑有多痛 2024-09-15 18:04:40

重新添加所有引用并没有自动解决我的问题,但手动将 DoNotHarvest 元素添加到每个项目引用中却可以解决问题。

Re-adding all the references did not automatically fix the problem for me but adding the DoNotHarvest element manually to each of the project references did.

自由如风 2024-09-15 18:04:40

首先尝试升级到最新版本。 WiX v3.5 正在开发中,因此问题可能已得到解决。如果没有,请确保该问题存在未解决的错误,以便社区了解该问题。最后,您可以尝试调试 HeatTask 以查看哪里出了问题。

First try upgrading to the latest build. WiX v3.5 is under development so the issue might have been fixed. If not, be sure there is a bug open on the issue so the community knows about the problem. Finally, you can try debugging the HeatTask to see where it is going awry.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文