I use VS2010. In my test project I have a folder named \"MessageInstances\" and in that folder there is a subfolder \"GET_ACTIVITY\", inside that folder there are xml files.
If you bring up the properties of the files in the solution explorer, verify that the files are set to Build Action: Content
and Copy to output director: Always
The DeploymentItem attribute will only work if Build Action on the item is set to Content and the Copy to Output Directory is set to Copy if Newer or Copy always. Additionally, if your tests are running with a testsettings file you need to enable Deployment in the settings. Make sure you are editing the active test run config in case you have mutiple.
Your DeploymentItem should be defined as follows:
[DeploymentItem("MessageInstances\\GET_ACTIVITY\\", "MessageInstances\\GET_ACTIVITY")]
Or using '@' instead of '\\'
[DeploymentItem(@"MessageInstances\GET_ACTIVITY\", @"MessageInstances\GET_ACTIVITY")]
i.e. you need to specify the output directory, otherwise the files will be copied to the Out directory of your test run.
Per MSDN , you can also try this if this helps,
To select files or folders to deploy, in run configuration
In Solution Explorer, under Solution Items, double-click the run configuration file that you want to edit.
A dialog box that has a name such as .testrunconfig appears. Click Deployment.
Under Additional files or directories to deploy, specify additional files or folders to be copied.
To do this, click Add file to select files; this opens the Add Deployment Files dialog box.
You can also click Add Directory to select folders by using the Add Deployment Directory dialog box.
In the .testrunconfig dialog box, click Save and then click OK.
These deployment items will be copied to the deployment folder whenever this run configuration file is active.
Hope this will help.
Some my colleagues experienced the similar problem with ReSharper MS test runner. The bug was specific for ReSharper 7.1 and has been fixed in current 7.1.1.
See http://youtrack.jetbrains.com/issue/RSRP-335233#tab=Comment