supportedRuntime element in config file and .NET version?

supportedRuntime element in config file and .NET version?

The FAQ says NCover has only be tested with .NET version 1.1.4322.

However, the Config file show this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup>
    <supportedRuntime version="v2.0.50727"/>
  </startup>
</configuration>

Why is v2.0.50727 found in the config file?

Thanks,

Neal Walters
http://VBScript-Training.com
http://Biztalk-Training.com
http://Sharepoint-Training.com


Re: &quot;NCover.Console.exe&quot; exited with code -3.

-3 is not a return code from NCover.Console (or at least not one that is programmatically set by NCover).

Post some more information about what you are going and perhaps we can help.
- versions of NCover, OS
- are you using Exec or the NCoverExplorer.NAntTasks (if the latter which version),
- extract from your build script showing the invoking of NCover
- output from the msbuild file related to the coverage task.
- does a coverage.log get generated and if so what content does it have


Re: &quot;NCover.Console.exe&quot; exited with code -3.

I am seeing something very similar, and I've been working on it all day.

NCover Version: 1.5.8.0

OS: Windows XP Pro

Using: NCoverExplorer.MSBuildTasks, Version 1.3.6.15

MSBuild Script:

<CreateItem Include="bin\debug\**\*.dll;bin\debug\**\*.exe;" Condition ="$(Configuration)=='debug'">
      <Output TaskParameter="Include" ItemName="NCoverAssemblies"/>
    </CreateItem>

    <CreateItem Include="bin\release\**\*.dll;bin\release\**\*.exe;" Condition ="$(Configuration)=='release'">
      <Output TaskParameter="Include" ItemName="NCoverAssemblies"/>
    </CreateItem>

    <MakeDir Directories ="$(artifactDirectory)\Coverage" />
 <MakeDir Directories ="$(artifactDirectory)\UnitTests" />
 <MakeDir Directories ="$(artifactDirectory)\CoverageLogs" />
   
    <NCover
      ToolPath="C:\Program Files\NCover"
      CommandLineExe="$(NUnitCmd)"
     CoverageFile="$(artifactDirectory)\Coverage\@(NCoverAssemblies->'%(FileName)').xml"
     WorkingDirectory="%(NCoverAssemblies.RootDir)%(NCoverAssemblies.Directory)"
      CommandLineArgs="$(DOUBLE_QUOTES)%(NCoverAssemblies.Filename)$(DOUBLE_QUOTES) /xml=$(artifactDirectory)\UnitTests\@(NCoverAssemblies->'%(FileName)').nunit.xml /nologo"
      LogLevel="Normal"
      Assemblies="@(NCoverAssemblies)"
      ContinueOnError="true"/>

MSBuild Output:

Task "NCover":
Creating settings file: C:\Documents and Settings\svc-neurobuild\Local Settings\Temp\tmp8E2E.tmp.ncoversettings
Arguments: //r "C:\Documents and Settings\xxx\Local Settings\Temp\tmp8E2E.tmp.ncoversettings"
Contents of config file:\r\n<?xml version="1.0" encoding="utf-8"?> <ProfilerSettings> <CommandLineExe>C:\Program Files\NUnit 2.4.1\bin\nunit-console.exe</CommandLineExe> <CommandLineArgs>"xxx.Seh" /xml=C:\xxx.nunit.xml /nologo</CommandLineArgs> <WorkingDirectory>C:\xxx\bin\debug\</WorkingDirectory> <Assemblies>xxx.Seh</Assemblies> <CoverageXml>C:\xServices.Seh.xml</CoverageXml> <XmlFormat>Xml1</XmlFormat> <LogFile>coverage.log</LogFile> <VerboseLog>false</VerboseLog> <NoLog>false</NoLog> <ProfileIIS>false</ProfileIIS> <DumpOnErrorNormal>false</DumpOnErrorNormal> <DumpOnErrorFull>false</DumpOnErrorFull> <CoverageBinary>Coverage.bcv</CoverageBinary> <AutoExclude>true</AutoExclude> </ProfilerSettings>
C:\Program Files\NCover\NCover.Console.exe //r "C:\Documents and Settings\xxx\Local Settings\Temp\tmp8E2E.tmp.ncoversettings"
The "NCover" task is using "NCover.Console.exe" from "C:\Program Files\NCover\NCover.Console.exe".
Unable to locate fixture
NCover.Console v1.5.8 - Code Coverage Analysis for .NET - http://ncover.org
Copyright (c) 2004-2006 Peter Waldschmidt
Command: C:\Program Files\NUnit 2.4.1\bin\nunit-console.exe
Command Args: "xxx.Seh" /xml=C:\xxx.nunit.xml /nologo
Working Directory: C:\xxx\bin\debug\
Assemblies: Medtronic.Neuro.CP.Platform.ManagementServices.Seh
Coverage Xml: C:\xxx.xml
Coverage Log: coverage.log
Waiting for profiled application to connect...Connected
Configuring Profiler...
******************* Program Output *******************
***************** End Program Output *****************
warning MSB6006: "NCover.Console.exe" exited with code 2.
The previous error was converted to a warning because the task was called with ContinueOnError=true.
Deleting settings file: C:\Documents and Settings\svc-neurobuild\Local Settings\Temp\tmp8E2E.tmp.ncoversettings
Build continuing because "ContinueOnError" on the task "NCover" is set to "true".
Done executing task "NCover" -- FAILED.

 

I'd really appreciate any help you could provide.  Thanks.

Brian


Re: &quot;NCover.Console.exe&quot; exited with code -3.

Hi Brian,

Something I should have mentioned with my previous post - the only exit codes that NCover should be returning itself in 1.5.8 (indicating some sort of internal failure when starting up) is the value "1". If that happened you would not be seeing any of the "Waiting for profiled application to connect" stuff as NCover would have failed by then. Any other value you see like in your output above is coming back from the application being profiled.

In your case you are getting an exit code of 2 coming back from attempting to run nunit-console. Looking at the NUnit source I can see that this is returned due to a number of potential reasons. Strangely though NUnit should be spitting out console statements indicating the cause prior to the exit which are not visible in your output.

I would suggest trying a later NUnit version, perhaps 2.4.3. The NUnit 2.4.0 and 2.4.1 versions were reported to have a number of issues with exit codes and appdomain unloading issues which resulted in sporadic test failures under NCover.

(Edit) I assumed that you have tried executing NUnit without NCover using the exact same arguments and that works?

Hope that was of some help...