-1

I am trying to use NCover 1.5.8 with Mbunit 2.4.2.130. I am using the following example from a bat file. I everytime I try running this, it tells that I can not connect to the NCOVER process?

SET NCOVERPATH=C:\Code\rsinetmvc\branches\web_app\trunk\build_tools\ncover\ REM Target path for assembly output, and report output. SET TARGETPATH=C:\Code\rsinetmvc\branches\web_app\trunk\product\RSINET.MVC.Tests\bin\debug\ SET MBUNITPATH=C:\Code\rsinetmvc\branches\web_app\trunk\thirdparty\mbunit\

echo %NCOVERPATH% echo %TARGETPATH% echo %MBUNITPATH% echo %REPORTFILEPATH% echo %MBUNITPATH%mbunit.cons.exe echo %TARGETPATH%RSINET.MVC.Tests.dll

"%NCOVERPATH%ncover.console.exe" //w %TARGETPATH% //a RSINET.MVC.Tests //h %REPORTFILEPATH% "%MBUNITPATH%mbunit.cons.exe" "%TARGETPATH%RSINET.MVC.Tests.dll"

user154366
  • 581
  • 2
  • 5
  • 19
  • What's the exact error message? Please include all of the output NCover and MbUnit emit (as long as it isn't huge). – Jeff Brown Aug 16 '09 at 18:32
  • Profiled process terminated. Profiler connection not established. – user154366 Aug 17 '09 at 15:39
  • It not connecting to Ncover? I don't know if I should skip NCover 1.5.8 and pay for NCover 3.2? – user154366 Aug 17 '09 at 15:39
  • I think you can get that error message from NCover if the profiler has not been registered yet. IIRC, there's a //reg command-line option. Also, NCover v1.5.8 wasn't designed with Vista privilege elevation in mind so there could be problems if you run as a non-admin user. In my opinion it is worth paying for NCover v3.2 just to get support from the guys at Gnoso. In my experience they have been very responsive to any issues I've encountered. – Jeff Brown Aug 18 '09 at 08:38
  • I am going to be setting our build server on Win xp, I hope the privilege is only applies to vista, win7. I have gotten it work, I had the command line args wrong, and I had to register the COM library. I did notice that I had to run everything from an admin console on my win 7 developement pc. ruby, rake file example: NCOVER flags "//w #{working_dir} //x #{coverage_file} //a #{assembly} #{mb_unit_path} #{assembly}.dll " Ruby regvr32 coverLIb.dll in Ncover folder sh "#{@regserve_file} -s #{dll}" – user154366 Aug 18 '09 at 12:39

1 Answers1

2

If you have found this thread because you are trying to get NCover 1.5.8 to work with .NET 4 then the following should fix this error:

Open a command prompt and type the following:

set COMPLUS_ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler

This instructs the .NET 4 CLR to load the .NET Framework 2.0 Profiler.

For more information see: http://msdn.microsoft.com/en-us/library/dd778910.aspx

Ian
  • 29
  • 2