Could not load file or assembly 'System.Web.Mvc'

I just wrote a blog post addressing this. You could install ASP.NET MVC on your server OR you can follow the steps here.


EDIT: (by jcolebrand) I went through this link, then had the same issue as Victor below, so I suggest you also add these:

* Microsoft.Web.Infrastructure
* System.Web.Razor
* System.Web.WebPages.Deployment
* System.Web.WebPages.Razor

I ran into the same issue as sgriffinusa. In addition to the references Phil's article suggests: http://www.haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx . I added these:

* Microsoft.Web.Infrastructure
* System.Web.Razor
* System.Web.WebPages.Deployment
* System.Web.WebPages.Razor

Godaddy Deployment worked perfectly. Turn custom errors off and add references to correct the errors. That should lead you in the right direction.


Installing MVC directly on your web server is one option, as then the assemblies will be installed in the GAC. You can also bin deploy the assemblies, which might help keep your server clear of pre-release assemblies until a final release is available.

Phil Haack posted a nice article a couple days ago about how to deploy MVC along with your app, so it's not necessary to install directly:

http://www.haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx


I ran into this same issue trying to deploy my MVC3 Razor web application on GoDaddy shared hosting. There are some additional .dlls that need to be referenced. Details here: http://paulmason.biz/?p=108

Basically you need to add references to the following in addition to the ones listed in @Haacked's post and set them to deploy locally as described.

  • Microsoft.Web.Infrastructure
  • System.Web.Razor
  • System.Web.WebPages.Deployment
  • System.Web.WebPages.Razor