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):


Error message stating Deployment is not enabled.


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.


  1. Open the project.
  2. Double-click the Test Settings file in use by the Project/Solution in the Solution Explorer.


    Double-Click the test settings file (yours may be different)


  3. Click Deployment in the left column.
  4. Check Enable Deployment.


    Select "Deployment" in the left column, then check the box for "Enable Deployment"


  5. Click Apply.


Note: It will likely be necessary to Rebuild your project before running the test again.