简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM