T. Smith
T. Smith

Reputation: 21

Wix Build "AssignTargetPath" Error in Heat.exe

I have searched around this site and others and cannot seem to find anyone who has ran into this specific error. Any information could be helpful.

I get the following error when building the Content Wix. The rest of the solution builds just fine, including the Infrastructure Wix and MPS.Content Wix.

heat.exe(0,0): error HEAT5313: Build error during harvesting: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2132,5): The "AssignTargetPath" task failed unexpectedly.

Upvotes: 1

Views: 422

Answers (2)

T. Smith
T. Smith

Reputation: 21

So it turns out that the folder structure was too long in TFS for one of the files used in the web service project which was being referenced in the content WIX.

So I remapped my TFS folder from "C:\Projects\Enterprise\etc..." to "C:\Projects\E\etc..." and that was apparently just enough of a change in folder structure length for it to be able to build.

Upvotes: 1

Chris Tanev
Chris Tanev

Reputation: 212

I don't know if this is going to help you , but i always use this as a template for harvesting files with heat(the only thing u need to change is the Directory value.

In your wixproj file :

  <Target Name="BeforeBuild">
<HeatDirectory NoLogo="$(HarvestDirectoryNoLogo)" SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)" SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)&#xD;&#xA;" ToolPath="$(WixToolPath)" TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)" TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)" VerboseOutput="$(HarvestDirectoryVerboseOutput)" AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)" GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)" OutputFile="HeatGenerated.wxs" SuppressFragments="$(HarvestDirectorySuppressFragments)" SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)" Transforms="%(HarvestDirectory.Transforms)" Directory="C:\Users\Bla" ComponentGroupName="Serviceware_CommonAssemblies" DirectoryRefId="PATHNAME" KeepEmptyDirectories="true" PreprocessorVariable="var.SourceDir" SuppressCom="%(HarvestDirectory.SuppressCom)" SuppressRootDirectory="true" SuppressRegistry="%(HarvestDirectory.SuppressRegistry)">
</HeatDirectory>

and then in you wxs file :

   <Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="PATHNAME" />
  </Directory>
</Directory>

and link the harvested files also in wxs :

    <ComponentGroupRef Id="Serviceware_CommonAssemblies"  />

Upvotes: 0

Related Questions