Windows Azure Websites: “The Target ‘MsDeployFilePreview’ does not exist in the project

A few days ago I was playing with Windows Azure Websites. I had a Windows Azure Cloud project with a WebRole. The project was rather simple, in fact just a normal MVC 4 website with no direct refs to Windows Azure. So this one could be deployed as a Windows Azure Website. Very interesting because with a MSDN account a number of site are free (later more).

When I tried, I got this error.

2012-06-18 23-50-41

On twitter I heard at least one other. The Windows Azure MVP mailing list came with the solution.

The solution: remove the file C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets. Then run this update ( For me this works.

Not sure what made the situation happen, but if I find out you will hear it.