How to Enable Deployment
Deployment is the process of copying test assemblies, dependencies, and any other specified files to an "Out Directory." By default, the AppBase is the "Out Directory." If you try to use a Project/Solution that has not had the necessary data copied over, you will receive a similar error to below (this is a common reason for an error starting with System.IO.FileNotFoundException):
By enabling Deployment, you are telling Visual Studio to copy all files for the project to the Out Directory. When it is disabled, everything runs out of the root folder for the project/solution.
The most common reason to see this issue is that you have copied the Project/Solution to a new machine and the machine is running VS 2010 (this feedback was made default as of VS 2010, VS 2008 users should not need to do this process). When you run the Project/Solution for the first time on the new machine, it will most likely not have the necessary resources (.dll files, assemblies, and other project specific items) in order to execute.
- Open the project.
- Double-click the Test Settings file in use by the Project/Solution in the Solution Explorer.
- Click Deployment in the left column.
- Check Enable Deployment.
- Click Apply.
Note: It will likely be necessary to Rebuild your project before running the test again.