12

Each time I run a test in nunit I get another nunit-agent, which does not exit the test completes, or when the tests are reloaded in nunit or when I restart nunit. This ever increasing list of nunit-agent.exe's creates a increasing problem when I try to attach to process from VS2010 and try to debug the running test

Any ideas, Trying to task kill these process is not the answer .... (my environment VS2010, dot net 4.0, nunit 2.5.8, ... )

user206890
  • 531
  • 6
  • 17

2 Answers2

17

I've just encountered the same problem. The fix is to edit the NUnit.exe.config file and add this:

<startup>
  <requiredRuntime version="4.0.30319" />
</startup>

as a child of the configuration element.

It also fixes another problem which is that you couldn't attach to NUnit from the debugger in order to set breakpoints in your tests.

Mark Rushakoff
  • 249,864
  • 45
  • 407
  • 398
Sean
  • 60,939
  • 11
  • 97
  • 136
  • 1
    This worked. P.S. A trick to editing the nunit.exe.config is to start a console under administrator, cd to C:\Program Files (x86)\NUnit 2.5.8\bin\net-2.0, type nunit.exe.config and it will open in VS under admin rights so you can save without hassle ... – user206890 Nov 29 '10 at 16:23
  • Another trick: Open `Help|About` and look at the `Framework Version`. If you _don't_ have the `requiredRuntime` set, v2.6.3 on my machine shows up as `Net 3.5`. With this addition, mine shows up as `Net 4.5` which is what I'd hoped for. This fixed problems for me with `JetBrains dotCover` compatibility. – cod3monk3y Dec 05 '14 at 23:03
2

I fixed this problem by upgrading to version 2.5.9 (development build). But this has other problems - so Sean's answer is better.

Jackson Pope
  • 14,520
  • 6
  • 56
  • 80