web-dev-qa-db-fra.com

MSB3073 'commande' terminée avec le code 9009

Chaque fois que j'exécute cette commande, l'erreur MSB3073 est générée avec le code 9009

$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg DatoCheckerWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)

Le fichier de construction entier est ici:

<?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>

La commande que j'utilise pour appeler cette version est la suivante:

 msbuild /t:Build;PublisWebsite;Harvest setup.build

Qu'est-ce que je suis supposé faire?

12
Highace2

Le code de sortie 9009 de cmd signifie fondamentalement «commande introuvable». En d'autres termes, $(WixPath)heat ne pointe pas vers quelque chose d'exécutable, ce qui est possible car je ne vois aucune propriété WixPath dans le code affiché. Un moyen rapide de résoudre ce problème consiste à utiliser une tâche Message avec le même argument que pour Exec afin de voir exactement ce qui est en train d’être exécuté. 

<Message Text='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER ....'/>

Collez la sortie sur la ligne de commande, exécutez-la et vérifiez si elle s’exécute.

16
stijn

J'ai changé la commande comme ci-dessous car j'utilise VS2010 avec Wix 3.8 et cela a fonctionné.

Command='"$(WiX)bin\heat.exe" dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg DatoCheckerWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'

Le problème pour moi est que le fichier heat.exe est introuvable dans le répertoire suivant.

8

Peut-être que vous avez des espaces dans WixPath? Essayez d'ajouter des devis:

<Exec Command='&quot;$(WixPath)heat&quot; ...'
    ContinueOnError="false"
    WorkingDirectory="." />
3
l33t