Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSB3073 'command' exited with code 9009

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?

like image 410
Zinoex Avatar asked Mar 29 '14 10:03

Zinoex


3 Answers

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.

like image 94
stijn Avatar answered Oct 01 '22 17:10

stijn


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.

like image 44
Barış Velioğlu Avatar answered Oct 01 '22 17:10

Barış Velioğlu


Maybe you have spaces in WixPath? Try adding quotations:

<Exec Command='&quot;$(WixPath)heat&quot; ...'
    ContinueOnError="false"
    WorkingDirectory="." />
like image 42
l33t Avatar answered Oct 01 '22 17:10

l33t