Friday
Sep262008
MSBUILD - item list flattening transform
Just a reminder to self about the MSBuild.
You can convert list of files into a space-separated string of file names (i.e. for feeding to NCover in your integration script) like this:
<CreateItem Include="$(TestPath)\*.Test.dll">
<Output ItemName="_testFiles" TaskParameter="Include"/>
</CreateItem>
<Message Text="@(_testFiles->'"%(FullPath)"', ' ')" />
It will output something like: "FullPathToTestAssembly1" "FullPathToTestAssembly2"...
Note, how consistent naming of test assemblies saves us the trouble of editing the build script, should a new test project be added to the solution.
Friday, September 26, 2008 at 12:32
Reader Comments