Web deployment task failed. (The type initializer for ‘Microsoft.Web.Deployment.DeploymentManager’ threw an exception.)
Okay, so I hit this problem and none of these answers worked for me. I boiled it down to a single line of code, namely: var deploymentOptions = new Microsoft.Web.Deployment.DeploymentBaseOptions(); If you don’t manually pass this to DeploymentManager it will internally instantiate this object. Even more interesting was that this code would run fine for … Read more