MSTest: Deployment Items are not copied to test folder
I have been reading many posts that describe my problem but I cannot find a solution. In my test project I have a folder called, 开发者_JAVA百科"resources".
- I have added this folder to the deployment items configuration.
- I enabled deployment items
- I made sure the file is marked "always copy"
I added the DeploymentItem annotment at the class level. The file never makes it the Testing "out" folder.
Can someone tell me what I missed?
[TestClass]
[DeploymentItem(@"resources\descriptor.xml")]
public class MyTests
{
[TestInitialize]
public void TestSetup()
{
XDocument descriptor = XDocument.Load("descriptor.xml"); //The barfs
}
}
It seems that the resharper test runner was the problem. If I run my tests using the VS test runner all is well.
精彩评论