Sunday, October 14, 2012 5:59 AM
I have following project structure:
Solution -My.Project -My.Project.Test --Resources ---mytest.file
In my test file following method:
string path = "Resources\\mytest.file"; ....
In according to http://msdn.microsoft.com/en-us/library/ms182475%28VS.80%29.aspx I want use only DeployItemAttribute without "Deployment Items property".
But when debugged it method i catch exception: "File not found".
How can I do?
Sunday, October 14, 2012 4:02 PM
Have you verified that you have "Enable Deployment" in your testsettings file ?
Monday, October 15, 2012 6:24 AMModerator
Thank you for posting in the MSDN forum.
If you want to deploy a file, you can refer to the following article to know more information about how to configure test deployment:
Generally, you can deploy a file in your active test settings for example Load.testsettings. Also you can deploy items for a single test using the DeploymentItem attribute like this:
Note that, when you deploy a file, you need to select “Enable Deployment” in your active test settings.
Amanda Zhu [MSFT]
MSDN Community Support | Feedback to us
- Proposed As Answer by Amanda ZhuMicrosoft Contingent Staff, Moderator Thursday, October 18, 2012 12:00 AM
- Marked As Answer by Amanda ZhuMicrosoft Contingent Staff, Moderator Monday, October 22, 2012 12:38 AM
- Unmarked As Answer by Amanda ZhuMicrosoft Contingent Staff, Moderator Tuesday, October 23, 2012 6:40 AM
Tuesday, October 23, 2012 6:32 AMYes, it is enabled.
Tuesday, October 23, 2012 6:38 AM
I do in according this link, but it is not help me.
But following URL helps me (thanks stackoverflow's guys):
Thursday, October 25, 2012 1:56 PM
There have been some changes between how deploymentitems are arranged between VS2010 and VS2012. Especially the target directory handling is different. In VS2010 specifying a target directory name lead to the files being copied to the directory. VS2012 will rename the source file to 'Resources'.
Adding a couple of slashes changes how this is interpreted: '.\Resources\' instead of 'Resources'.
Also, the different test frameworks handle this slightly different.
See my original connect item for this bug.
My blog: blog.jessehouwing.nl