# Thursday, August 30, 2007
« SVN & CC.NET - Only Build When a Cha... | Main | Versioning C# Projects with MSBuild »

Something I noticed today while cleaning up an MSBuild script is that there seems to be a direct correlation between the load time of bootstrapping MSBuild and your ItemGroups.  I noticed this because I have an ItemGroup that has an exclude to ignore any .svn folders on disk that I set at the parent folder level which contains a lot of files.

<ItemGroup>

  <System32Files

    Include="$(ProjectDirectory)\Libs\SdDriver\**\*.*"

    Exclude="$(ProjectDirectory)\**\$(SvnFolder)\**"/>

</ItemGroup

 

WHen I changed the above Exclude to $(ProjectDirectory)\Libs\**\$(SvnFolder)\** my build script load time was noticeably faster.  The interesting thing is, MSBuild doesn't count the loading of ItemGroups in its calculation of "Time Elapsed," running with either exclude setting produced identical Time Elapsed results - even though there was an obvious difference in run times.

Comments are closed.