views:

407

answers:

2

I'm implementing continuous integration with CruiseControl.NET, .NET 4.0, NCover and MsTest. On the build server I'm unable to run code coverage from the Ncover explorer or NCover console. When I run where vstesthost.exe from the Ncover console it returns the Visual Studio 9.0 path and does not seem to pick up .net framework 4.0. I've followed instructions from this MSTest: Measuring Test Quality With NCover post with slight modifications for .net framework 4.0, without any 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 come across similar issue. Any help would be much appreciated.

A: 

MSTest 4.0 changed the name of its helper process from "vstesthost.exe" to "qtagent.exe" (I think that's the right name, but my memory is a little fuzzy. MSTest will start the helper process as long as the /noisolation parameter isn't used. You can then use process explorer to figure out what the name is).

Additionally NCover 3.3 (the current release) does not support .NET 4. NCover 3.4 is supposed to have .NET 4 support; if you email [email protected] they'll probably send you a build if you ask.

Stephen Ward
A: 

Actually NCover 3.4 supports .Net 4.0 +info If you are looking for support in the community version I'm afraid it is stuck in the 1.5.8 and I don't think it is going to support it.

Cristian