无论何时执行此命令,它都会引发错误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
发布评论