MSB3073“命令"以代码 9009 退出 [英] MSB3073 'command' exited with code 9009

查看:35
本文介绍了MSB3073“命令"以代码 9009 退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我执行此命令时,它都会抛出错误 MSB3073,代码为 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)

整个构建文件在这里:

<?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="..\DatoCheckerMvcDatoCheckerMvc.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

我该怎么办?

推荐答案

从 cmd 退出代码 9009 基本上意味着找不到命令".换句话说, $(WixPath)heat 没有指向可执行文件,这可能是因为我在显示的代码中的任何地方都没有看到属性 WixPath.一种快速的调试方法是使用与 Exec 具有相同参数的 Message 任务,这样您就可以准确地看到正在尝试执行的内容.

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.

这篇关于MSB3073“命令"以代码 9009 退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆