NCover integration issues with CC.NET, .NET framework 4.0 and MsTest
I am implementing continuous integration with CruiseControl.NET, .NET 4.0, NCover and MsTest. On the build server, I cannot start code coverage from Ncover explorer or NCover console. When I run where vstesthost.exe
Ncover from the console, it returns the Visual Studio 9.0 path and doesn't seem to pick up the .net framework 4.0. I followed instructions from MSTest: Measuring Test Quality with NCover Post with Minor Changes for .NET Framework 4.0 with no success.
My CC.NET script looks like this
<exec>
<executable>C:\Program Files (x86)\NCover\NCover.Console.exe</executable>
<baseDirectory>$(project_root)\</baseDirectory>
<buildArgs>"C:\Program Files (x86)\**Microsoft Visual Studio 10.0**\Common7\IDE\MSTest.exe" /testcontainer:...\...\UnitTests.dll /resultsfile:TestResults.trx //xml D:\_Projects\....\Temp_Coverage.xml //pm vstesthost.exe</buildArgs>
<buildTimeoutSeconds>$(ncover.timeout)</buildTimeoutSeconds>
</exec>
Has anyone faced a similar problem. Any help would be much appreciated.
a source to share
MSTest 4.0 changed the name of their helper process from "vstesthost.exe" to "qtagent.exe" (I think the name is correct, but my memory is a little fuzzy. MSTest will start the helper process if / noisolation is not in use. Then you can use the process handler to find out what the name is).
In addition, NCover 3.3 (current version) does not support .NET 4. NCover 3.4 must support .NET 4; if you email support@ncover.com they will probably send you a build if you ask.
a source to share