Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>after more searching I found this:</p> <blockquote> <p>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:</p> <p>Open a command prompt and type the following set COMPLUS_ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler</p> <p>This instructs the .NET 4 CLR to load the .NET Framework 2.0 Profiler.</p> <p>For more information see: <a href="http://msdn.microsoft.com/en-us/library/dd778910.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/dd778910.aspx</a></p> </blockquote> <p>at the end of the thread <a href="http://kiwidudeuk.blogspot.com/2007/04/ncover-problems-fixes-part-1.html" rel="nofollow noreferrer">here</a></p> <p>which seems to solve my problem</p> <p><strong>EDIT</strong>: </p> <p>it doesn't solve my problem really. Now it just allows the coverage.xml to be generated, but it only contains the v2.0 framework assemblies, so only the .net 2.0 assemblies are profiled....</p> <p>Grrr. back to the drawing board... </p> <p><strong>EDIT 2</strong></p> <p>Hallelujah! I have figured this out by a process of random googling and changing. anyway, due to some pointers found <a href="https://connect.microsoft.com/VisualStudio/Feedback/Details/508506" rel="nofollow noreferrer">here</a> I was able to figure out that what I needed to do was to alter the exe.config of the application running the code (nunit.console-x86.exe in this case) file to not only force a specific version of the .net framework to be loaded but also to allow the legacy activation policy to be used. To cut a long story short I was able to solve this by:</p> <ul> <li>Adding to the nunit-console-x86.exe.config the following section:</li> </ul> <blockquote> <pre><code>&lt;configuration&gt; &lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt; &lt;supportedRuntime version="v4.0.30319"/&gt; &lt;/startup&gt; &lt;/configuration&gt; </code></pre> </blockquote> <ul> <li><p>setting these in the environment that the command is launched from:</p> <p><code>set ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler</code><br> <code>set COMPLUS_ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler</code><br> (not sure both are necessary, but that's what I did)</p></li> </ul> <p>I also added a similar setting to the NCover.Console.Exe.config, but it turns out that is unnecessary. </p> <p><strong>EDIT 3</strong> </p> <p>this is the command line I am using (note that I copied all of ncover and nunit and my test assemblies into one directory to simplify things)</p> <p><code>NCover.Console.exe nunit-console-x86.exe /framework=4.0.30319 Your.Test.Assembly.dll //x coverage.xml //reg</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload