views:

11

answers:

1

I have some Tests that I run with ReSharpers "Run All Tests from Solution" feature. One of the classes being tested has a dependency on a file in the same folder as the assembly containing it. This file is copied to the output directory via MSBuild (set "Copy To Output Directory" to "Copy always").

Problem: The tests are not being run from the normal assembly output directory, but instead some temporary location in my user profile.

Therefore, I don't really know where to look for the file - the test runner does not copy it there. Can I force it to?

+1  A: 

Sounds like you're running your tests with the Shadow Copy option turned on.

Go to Resharper->Options and select the Unit Testing tab (right at the bottom of the list). Uncheck "Shadow-copy assemblies being tested" and try again.

Samuel Jack
spot on :) thanks!
Daren Thomas