patkua@work

Faster MSBuild Scripts – Convert ItemGroup to CreateItem

Speed, speed, speed… I wish MS tools would give me faster and faster feedback.

My lesson from last week – stay far away from ItemGroup elements in MSBuild files for most normal fileset equivalents (most especially if they only get used once). They are far better as CreateItem elements (though unfortunately only declarable within a Target element), taking almost the same syntax.

The result – instantaneous execution of any other targets outside of the one that uses these items, and a quicker ability to fail faster if you mistype the target name. Maybe it’s time to convert all of our targets to Nant?

Exit mobile version