Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper Unit Test Runner Can't Find Content Files

I have some tests that rely on some files I have marked as "Content" and to "Always Copy". I'm using the DeploymentItem attribute to make sure they get copied to the output directory when running mstest outside of VS. However when using the Resharper test runner inside VS these files never make it to the directory that it is executing from. Anyone know how to fix this?

like image 672
Micah Avatar asked Nov 09 '10 03:11

Micah


2 Answers

Disabling the Unit Testing > Shadow-copy assemblies being tested Resharper option fixed this problem for me.

like image 165
Meta-Knight Avatar answered Nov 12 '22 19:11

Meta-Knight


We solved this problem by marking the test files as embedded resources and then used a utility method to read the embedded resource and write it to the expected location.

like image 32
Handcraftsman Avatar answered Nov 12 '22 18:11

Handcraftsman