Updated: This project now has its own page.
I use CruiseControl.NET with MSBuild for automated build of a .NET 2.0 project. You can find instructions how to setup this in Michael Swanson's Blog. Everything works fine but one thing that bothered me was that CC.NET logged raw console output from MSBuild, whereas I wanted the results as structured XML document so it can be nicely integrated into the build report and formatted with XSL. What I needed was an XML Logger for MSBuild.
I first found one written by Wilco Bauwer but didn't liked that way it logged the build events (as plain list of events losing the hierarchy of the build process) but it helped me a lot to get started. Besides the log files were really huge. This made me to write one myself. I've posted the first version working with .NET 2.0 Beta 1 to the CC.NET JIRA. In Beta 2 you can notice that console output is colored but I still haven't found any XmlLogger as part of the Framework. But the MSBuild API changed slightly (now each type of build event has different signature) so here you can download the updated version.
To use it execute following command line:
MSBuild.exe yourproject.sln /logger:Kobush.Build.Logging.XmlLogger,Kobush.MSBuild.dll;buildresult.xml
You can also add following switches to prevent any console output:
/nologo /noconsolelogger
The output verbosity level can be specified using /verbosity parameter. I tried to make it produce the same output on various levels like from default console logger.
Updated: I've included two XSL files for CC.NET Web Dashboard that can format the build results. First one (compile-msbuild.xsl) adds new section on build summary page. To use it add following line in the dashboard\plugins\buildPlugins\buildReportBuildPlugin\xslFileNames section of the dashbard.config file:
xsl\compile-msbuild.xsl
Second one (msbuild.xsl) can be used to configure additional project report plug-in. Add following line in the dashboard\plugins\buildPlugins section:
Above configuration applies to latest CC.NET 0.9 but the files can be used with earlier versions.
I hope someone would find it useful and if you have any problems or suggestions just let me know.