Resharper 10.0.2 loads supplementary files from Resharper install directory


While running a unit test I'm referencing an XSLT file through a relative path. I've verified that the file is available in the project\bin\Debug directory.

However the test runner is adamant in trying to load from C:\Users\dvuurboom\AppData\Local\JetBrains\Installations\ReSharperPlatformVs10\TransformToDataModel.xslt

Shadow-copy assemblies are turned off.

Some googling seemed to indicate that this was a known issue, fixed in 10.0.2, but I still run in to it.

Any ideas? Thanks in advance.

Comment actions Permalink
Official comment

Hello Daniel,

Do you use NUnit 3.0? If so, please refer to

This is by design, as shown here:

In earlier versions, NUnit changed the working directory. It no longer does so. You can use TestContext.TestDirectory to get the directory that contains the test assembly.

So it is not R# fault, it is just new behavior of NUnit 3.0. Please use "TestContext.TestDirectory" instead.


Comment actions Permalink

 That looks like the cause indeed. Thanks very much.

Strange though. To me the bin directory sounds very much like it should be the normal working directory. It will be in production, so why wouldnt it be during testing?

Comment actions Permalink

Hello Daniel,

ReSharper NUnit runner is stored in %LocalAppData%\JetBrains\Installations\ReSharperPlatformVs10\ folder so that's why now it runs from there. In Nunit 2.x, Test Framework was responsible for changing working directory, but NUnut 3.x changed the behavior. We are not going to change anything on our side since we do not want to break default behavior.   



Please sign in to leave a comment.