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.

Ryan Conrad
  • 6,870
  • 2
  • 36
  • 36

7 Answers7

2

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

LCarter
  • 473
  • 7
  • 13
2

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.

2

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.

sjngm
  • 12,423
  • 14
  • 84
  • 114
Mathias
  • 21
  • 2
2

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">
David Martin
  • 11,764
  • 1
  • 61
  • 74
  • This also worked for me after an upgrade of MSBuild tools from 2008 to 2010 on our TFS server. – Rabid Nov 30 '11 at 13:37
1

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.

1

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.

0

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.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • problem still persists with the latest weekly build. is there something I'm doing to cause this error? Can "HarvestProjects" be disabled, that looks like the target it is failing in – Ryan Conrad Jul 11 '10 at 19:51
  • I have "worked around" this issue, by adding a True to my Custom Action project reference that is in my build script. thanks, you got me looking in the right direction, although I still dont know what actually caused the error – Ryan Conrad Jul 11 '10 at 20:25