Resharper Unit Test Runner Can't Find Content

2019-02-16 13:27发布

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?

2条回答
等我变得足够好
2楼-- · 2019-02-16 14:01

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.

查看更多
一夜七次
3楼-- · 2019-02-16 14:18

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

查看更多
登录 后发表回答