The problem is that unless you state otherwise, NUnit will create a subprocess to run the tests when it determines it. If you look at it in Process Explorer, you will see that "nunit-console.exe" * generates "nunit-agent.exe" *. The Visual Studio debugger does not automatically join child processes.
In this case, I believe the version mismatch is why he wants to start the subprocess. The easiest way to get around this is to edit "nunit-console.exe.config" * to change the set of <supportedRuntime> values. There should already be a comment indicating the line you should comment to make it work like .NET 4.0:
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v2.0.50727" /> <supportedRuntime version="v4.0.30319" /> </startup>
Once you change this, the first NUnit process will already be .NET 4.0, and it will not need to create a subprocess. If you want to be sure, specify /process=Single , and NUnit will either be launched in the same process, or it will immediately work if it cannot.
* - If you need to use x86 versions, replace:
nunit-console.exe -> nunit-console-x86.exe nunit-agent.exe -> nunit-agent-x86.exe nunit-console.exe.config -> nunit-console-x86.exe.config
Weeble
source share