Deploying MVC dependencies to Azure

Posted on

If you creating web application to be deployed to Windows Azure, you probably noticed that deployment and azure instance initialization may take a while. Any missing reference or break will cause you time and lost productivity.

Few days ago I spent couple of hours trying to include all mvc references one by one making sure that application app has minimum set of required assemblies.

Phil hack published an article regarding how to include MVC,Razor dependencies into your deployment.

By default Azure instance will not have required packages installed. So you need to make sure that all files will be located in your bin folder.

“If your server doesn’t have ASP.NET MVC 3 installed, you’ll need to make sure the following set of assemblies are deployed in the bin folder of your web application:

  • Microsoft.Web.Infrastructure.dll
  • System.Web.Helpers.dll
  • System.Web.Mvc.dll
  • System.Web.Razor.dll
  • System.Web.WebPages.Deployment.dll
  • System.Web.WebPages.dll
  • System.Web.WebPages.Razor.dll

Simply right click on your project to add deployable dependencies.


For other GAC assemblies which are not part of .net 4.0 framework make sure to set Copy Local flag to true:


Tags: , , ,

  • gabriel

    Cheers for this, mate 🙂