Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nunit agent hangs even after using .NET 4.0 in config file

I am facing issues with nunit.

When I run unit tests and close the nunit application, the application closes with significant delay and nunit86.exe process remains in memory. I need to kill it to build the code again with changes.

I face the same issue when I run the unit test cases with ReSharper.

After searching on web, I came across this and this solution.

I made the required changes in config file and found that the application closes promptly but a pop up comes saying "Nunit agent stopped working". I had to close it each time.

It is really painful as we are also using nunit on CC.NET.

Any solution for this will be appreciated.

I have used following version's of Nunit but no success

  1. NUnit 2.5.5
  2. NUnit 2.5.9
  3. NUnit 2.5.10
  4. NUnit 2.6.2

I tried it using following version's of Nunit.

like image 950
Ram Avatar asked Jan 19 '26 02:01

Ram


1 Answers

I came across this issue with nunit 2.6 to get it to work i modified the nunit-console.exe.config as follows:

<startup useLegacyV2RuntimeActivationPolicy="true">
    <!-- Comment out the next line to force use of .NET 4.0 -->
    <!-- <supportedRuntime version="v2.0.50727" /> commented out as it is causes nunit to hang. -->
    <supportedRuntime version="v4.0.30319" /> 
</startup>

note the commenting out of the v2 runtime

like image 132
Edward Wilde Avatar answered Jan 21 '26 14:01

Edward Wilde



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!