Friday, October 9, 2009

Hack ReSharper for x64 unit tests

If you need to develop 64bit .NET application and run unit tests with R#, you will find that it's not possible, because Visual Studio is 32bit process and R# task runner is loaded as 32bit as well. There is quick and dirty solution to that.

1) Stop Visual Studio
2) Find JetBrains.ReSharper.TaskRunner.exe
3) Drop read-only flag on the file
4) Run
CorFlags.exe JetBrains.ReSharper.TaskRunner.exe /32BIT- /Force


The assembly have now broken signature and VS/R# complains about that. But now you could debug your 64bit unit tests. More info would be probably here

1 comment:

John Rusk said...

For Resharper 5, you can just set the Platform Target, of the assembly you are testing, to x86 (in the IDE's Properties for that project). The new Resharper 5 test runner apparently detects that and runs the tests as 32 bit.