其他MSBuild中的exceute MSBuild XML文件
我正在尝试创建我所有项目的自动构建, 我的一些项目已经具有生成这些项目的其他MSBuild中的exceute MSBuild XML文件,xml,visual-studio,build,msbuild,Xml,Visual Studio,Build,Msbuild,我正在尝试创建我所有项目的自动构建, 我的一些项目已经具有生成这些项目的MSBuild.xml文件 是否有一个选项可以通过其他MSBuild文件生成这些MSBuild.xml?是的,您可以 <Target Name="BuildAnOutsideMSBuild"> <MSBuild Projects="$(WorkingCheckout)\Another_Solution_Or_CsProj_or_MsBuildFile.proj" Targets="Build"
MSBuild.xml
文件
是否有一个选项可以通过其他MSBuild
文件生成这些MSBuild.xml
?是的,您可以
<Target Name="BuildAnOutsideMSBuild">
<MSBuild Projects="$(WorkingCheckout)\Another_Solution_Or_CsProj_or_MsBuildFile.proj" Targets="Build" Properties="Configuration=$(Configuration)">
<Output TaskParameter="TargetOutputs" ItemName="TargetOutputsItemName"></Output>
</MSBuild>
<Message Text="Build completed" />
</Target>
如果您的“子项目”需要任何类型的路径(文件名或文件夹名)。。不能发送相对路径。
您必须发送完整路径。(有一个例外,如果parent.sln和child.sln存在于同一个目录中……但在我的经验中,这种情况并不经常发生)
大概是这样的:
<ConvertToAbsolutePath Paths="..\"> <!-- Some relative path here -->
<Output TaskParameter="AbsolutePaths" PropertyName="MyAbsolutionPathProperty"/>
</ConvertToAbsolutePath>
<Message Text="'MyAbsolutionPathProperty' = '$(MyAbsolutionPathProperty)'" />
现在,您可以将“MyAbsolutionPathProperty”作为参数发送到“外部”MSBuild.proj。?