1

I run NCoverExploler, configure it, so command line look like this

"D:\Development\Projects\t.net\lib\NCover\NCover.Console.exe" //reg //w "D:\Development\Projects\t.net\build_output\t.net" //v "D:\Development\Projects\t.net\lib\NUnit\nunit-console.exe" t.Core.Tests.dll /framework=4.0

Output coverage.xml appears to be empty. In the same time, if I run Coverate report by Visual Studio (by TestDriven.Net), it generates just perfectly.

I've compared coverage.log files for 2 cases. In case if I run by NCoverExporer:

EVENT: Log link established. EVENT: Communications link established. MESSAGE: Ready for command input. EVENT: Verbose Logging Disabled EVENT: Logging Enabled EVENT: AutoExclusion Enabled MESSAGE: Monitoring Assemblies: (All Loaded Assemblies) MESSAGE: Excluding Types and Methods with these Attributes: CoverageExcludeAttribute; MESSAGE: Received driver ready event. MESSAGE: v2.0.50727

In case of TestDriven.net

EVENT: Log link established. EVENT: Communications link established. MESSAGE: Ready for command input. EVENT: Verbose Logging Disabled EVENT: Logging Enabled EVENT: AutoExclusion Enabled MESSAGE: Monitoring Assemblies: Microsoft.Web.Mvc;Moq;T.Core;T.Core.Tests;Web; MESSAGE: Excluding Types and Methods with these Attributes: CoverageExcludeAttribute;System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute; MESSAGE: Received driver ready event. MESSAGE: v4.0.30319

Please see the difference in Monitoring Assemblies and MESSAGE: v4.0.30319. In case of TD.net, it correctly supples .NET framework.

Any clues, how to make NCover make work, as it in TD.net ? Where is it configured?

Sam Holder
  • 32,535
  • 13
  • 101
  • 181
Alexander Beletsky
  • 19,453
  • 9
  • 63
  • 86

2 Answers2

2

try the answer I found here: Force NCover 1.5.8 to use v4 framework like testdriven.net does?.

I also made all programs run with .net 4 using the other answer to that question, but don't know if that was important or not. I'll investigate and update the answer.

I have updated my answer in the other thread with the solution which I was able to use to get things up and running on my (win 7 x64) machine. Hopefully it will help you, I now get the MESSAGE: v4.0.30319 in my coverage.log.

Community
  • 1
  • 1
Sam Holder
  • 32,535
  • 13
  • 101
  • 181
0

NCover 1.5.8 Does not support .net 4.0 and it looks like TD.NET is picking up .NET 4 as the default.

joe.feser
  • 439
  • 3
  • 10
  • don't really get this? If NCover does not support it, how it works in TD.net ? – Alexander Beletsky Oct 19 '10 at 18:40
  • It must be compiling the code as .net 2 code and running it that way. 1.5.8 only supports the .net 2.0 profiler api. – joe.feser Oct 29 '10 at 01:07
  • its true that 1.5.8 only supports the .net 2.0 profiler api, but its possible to make the .net 4.0 apps interact with the .net 2.0 profiler api. no guarantees about success, but the solution in the linked question in the other answer worked for me. – Sam Holder Feb 07 '11 at 17:11