gpt4 book ai didi

msbuild - MSB3073 'command' 退出,代码 9009

转载 作者:行者123 更新时间:2023-12-02 16:40:14 26 4
gpt4 key购买 nike

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

我用来调用此构建的命令是:

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

我该怎么办?

最佳答案

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

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

将输出粘贴到命令行上,运行它并检查它是否执行。

关于msbuild - MSB3073 'command' 退出,代码 9009,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22730003/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com