I've been playing around with Visual Studio 2010, and of course the latest ReSharper, version 5. Unfortunately my NUnit tests wouldn't run inside the ReSharper runner. Instead they would spin for a second then turn grey, like nothing happened.
Running the tests under the debugger turned up an interesting exception in the VS output window: BadImageFormatException. I also noticed a bunch of DLLs being loaded out of the v2.0 framework GAC, and not .NET 4. Shouldn't my .NET 4 app be using the .NET 4.0 GAC?
Of course it should. There's an easy fix to this. ReSharper shells out to another exe that actuall runs the unit tests JetBrains.ReSharper.TaskRunner.exe. If we modify the JetBrains.ReSharper.TaskRunner.exe.config in the ReSharper installation directory we can force the test runner to run under the .NET 4.0 framework. At the bottom of the file you'll find the associated startup element already there, just commented out and with the .NET 4.0 beta 1 framework version. To fix it, just incomment it and change the version to the .NET beta 2 framework version.
<!-- Needed in dev10, not needed in dev9/8 -->
<startup>
<requiredRuntime version="v4.0.21006"/>
</startup>
Now you can run unit tests via ReSharper in VS 2010 beta 2.