Msbuild CoreCompile Depends On Goals

This is what we have: ccnet + tfs + msbuild.

The problem is that the build process is too slow due to the large number of projects.

I did some investigation and this is what I want to do.

After each project has been compiled, it is copied from the output folder to the shared folder, and this operation is performed in any case, even if this project has not been compiled. So I checked the detailed msbuild logs and found what I found: Skipping the target "CoreCompile" because all output files are updated with respect to the input files.

This is the validation action specified in Microsoft.TeamFoundation.Build.targets. The question is, how can I intercept this information, create my own goal, add some condition and make some kind of trigger, if the message “Skip target” message “CoreCompile” appears, then do not start my copy target and skip it if the project was, then this copy of this copy should work.

+3
source share
1 answer

I just wrote this at http://sedodream.com/2012/05/14/MSBuildHowToExecuteATargetAfterCoreCompile.aspx , but I inserted the content for you below.

StackOverflow " , , CoreCompile, CoreCompile?" .

, , CoreCompile . , CoreCompile, , .

MSBuild - . " " . , " ", - , "" . , . , / . , MSBuild . , , . (FYI) , , , http://sedodream.com/2010/09/23/MSBuildYouveHeardOfIncrementalBuildingButHaveYouHeardOfPartialBuilding.aspx).

, , , /. , CoreCompile , , / CoreCompile, . , , CoreCompile , , . , , , , . / /, . , .

CoreCompile

, , Microsoft.Common.targets , .targets. , Microsoft.CSharp.targets, Microsoft.VisualBasic.targets( # VB). .targets CoreCompile. CoreCompile .

<CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''"/>

, TargetsTriggeredByCompilation. , , , CoreCompile , . .

<PropertyGroup>
  <TargetsTriggeredByCompilation>
    $(TargetsTriggeredByCompilation);
    MyCustomTarget
  </TargetsTriggeredByCompilation>
</PropertyGroup>

<Target Name="MyCustomTarget">
  <Message Text="MyCustomTarget called" Importance ="high"/>
</Target>

TargetsTriggeredByCompilation MyCustomTarget. , $(TargetsTriggeredByCompilation),, , , . , - , .

, , , CoreCompile MyCustomTarget. CoreCompile MyCustomTarget, .

enter image description here

+3

All Articles