Adding an Existing MVC 2 project as a Web Role in Azure

This one has bitten me a couple of times (at least) now, so let’s get it down in writing.  Although the latest (as of July 20th, 2010) Visual Studio Tools for Azure support adding MVC 2 projects as web roles, you need to remember to set the “Copy Local” property to “true” for the System.Web.Mvc assembly.  The VS Cloud Template does this automatically, but if you’re adding an existing MVC 2 project as a web role for a cloud project, you’ll have to do so manually…  at least until the MVC 2 bits become a part of the standard part of Azure VMs.

image