MSB3073“命令"已退出,代码为9009

编程入门 行业动态 更新时间:2024-10-25 19:38:04
本文介绍了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="schemas.microsoft/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

我该怎么办?

推荐答案

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

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

本文发布于:2023-11-16 10:14:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603368.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:命令   代码   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!