Whenever I execute this command it throws error MSB3073 with code 9009
$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg DatoCheckerWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)
The entire build file is here:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebSiteSource>..\DatoCheckerMvc\</WebSiteSource>
<SetupF>..\Setup\</SetupF>
<PublishF>publish\</PublishF>
<Publish>$(SetupF)$(PublishF)</Publish>
<WebSiteContentCode>WebSiteContent.wxs</WebSiteContentCode>
</PropertyGroup>
<!-- Defining group of temporary files which is the content of the web site. -->
<ItemGroup>
<WebSiteContent Include="$(WebSiteContentCode)" />
</ItemGroup>
<!-- The list of WIX input files -->
<ItemGroup>
<WixCode Include="Product.wxs" />
<WixCode Include="$(WebSiteContentCode)" />
</ItemGroup>
<Target Name="Build">
<!-- Compile whole solution in release mode -->
<MSBuild
Projects="..\DatoCheckerMvc.sln"
Targets="ReBuild"
Properties="Configuration=Release" />
</Target>
<Target Name="PublishWebsite">
<!-- Remove complete publish folder in order to be sure that evrything will be newly compiled -->
<Message Text="Removing publish directory: $(SetupF)"/>
<RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
<Message Text="Start to publish website" Importance="high" />
<MSBuild
Projects="..\\DatoCheckerMvc\DatoCheckerMvc.csproj"
Targets="ResolveReferences;_CopyWebApplication"
Properties="OutDir=$(Publish)bin\;WebProjectOutputDir= $(Publish);Configuration=Release" />
</Target>
<Target Name="Harvest">
<!-- Harvest all content of published result -->
<Exec Command='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg DatoCheckerWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
ContinueOnError="false"
WorkingDirectory="." />
</Target>
</Project>
The command I use to call this build is:
msbuild /t:Build;PublisWebsite;Harvest setup.build
What am I supposed to do?
Exit code 9009 from cmd basically means 'command not found'. In other words $(WixPath)heat
doesn't point to something executable, which is possible cause I don't see a property WixPath anywhere in the code shown. A quick way to debug this is use a Message
task with the same argumenst as for Exec
so you can see exactly what is trying to execute.
<Message Text='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER ....'/>
The paste the output on the command line, run it and check if it executes.
I changed the command like below as I use VS2010 with Wix 3.8 and it worked.
Command='"$(WiX)bin\heat.exe" dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg DatoCheckerWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
The problem for me is the heat.exe cannot be found with the following directory.
Maybe you have spaces in WixPath
? Try adding quotations:
<Exec Command='"$(WixPath)heat" ...'
ContinueOnError="false"
WorkingDirectory="." />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With