I create various projects using the <MSBuild Projects = "markup ... Then I launch some command line tools after creating the project.
eg
<Target Name="Name"> <MSBuild Projects="" /> <Exec Command="" /> </Target>
I notice that the project is built as needed and gets the following result when you run the build script: "Skip the target" CoreCompile "because all output files are updated." This is great, but how do I get my <Exec ... commands to use the same condition so that they are executed only when necessary?
Update: I implemented the gregmac suggestion, but it still executes the command independently. This is what I have now:
<Target Name="Name"> <MSBuild Projects=""> <Output TaskParameter="TargetOutputs" ItemName="AssembliesBuiltByChildProjects" /> </MSBuild> <Exec Command="" Condition="'@(AssembliesBuiltByChildProjects)'!=''" />
Any additional help is greatly appreciated. This is a bit for me.
Thanks for any advice.
Alan
post conditional build msbuild
Alan spark
source share