Saturday, March 26, 2011

Deployment is currently disabled

 

  • So you write a new MS Test Unit test and you try to run the test and you get a “Deployment is currently disabled” error? So how to fix this.
  • This happens if your unit test is referring a method which has a deployment Item (say whether it is a test file or a referred dll), in your code you would see [DeploymentItem(pathtofile)] Annotation.
  • This is a very simple fix.
  • Try to find out which “.testsettings” file is currently in use, by default it is the “Local.testsettings”, double click on it to open the “Test Settings” popup window, in that window click on “Deployment” Item in the left to see the “Deployment” settings screen as shown below.
  • Check the checkbox which says "[*] Enable deployment” and try to save the file and try running your test again and it should work.

Deployment_Enable

1 comment:

codebreaker said...

this is so helpful! thank you! your blog is the only place on the google-web i found a solution to this error.