MSBuild, NUnit and CruiseControl.Net
I thought this would be the de facto standard setup for most .Net project these days. But it turns out making the whole thing work is far from "standard". Here are the steps I took, for what it's worth:
- MSBuild is installed with .Net Framework 2.0. Install CruiseControl from here, and NUnit from here.
- Install MSBuild Community Tasks, which includes a NUnit task for MSBuild.
- Now you can create NUnit task in MSBuild project like this:
<Import Project="$(MSBuildExtensionsPath\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/> <NUnit Assemblies="myTest.dll" ToolPath="C:/Program Files/NUnit 2.4/bin/" OutputXmlFile="TestResult.XML"/>
Fatal Error C1902: Program database manager mismatch; please check your installation.Believe me, this has nothing to do with the pdb files. Unfortunately, link to the hotfix mentioned in the KB article is broken. An alternative is to set your CruiseControl service to run under a different use account than the default SYSTEM. (Yeah, I know...)