Reputation: 4417
I'm using VS2010 and I'm deploying my MVC3 app to my webserver. I went to Project->Publish settings and added my database connection and thats it. I right clicked on my application and clicked "Build deployment package" which generated a zip file. I copied it to my server and imported the application into IIS with no errors. But when I try to load it in a browser I get the dreaded :
Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
I took that line out of web.config, then i got:
Could not load file or assembly 'System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
I took that line out of web.config, then i got:
Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
Need i continue? What am i doing wrong when I deploy or build my application to load it into IIS so all dependencies are avaiable?
.NET 4.0 is the default app pool in IIS.
Upvotes: 1
Views: 1789
Reputation: 2876
You could add deployable dependencies by right-clicking project and selecting "Add Deployable Dependencies".
http://msdn.microsoft.com/en-us/library/gg286946.aspx
Note that it requires Visual Studio 2010 Service Pack 1 or later versions of Visual Studio.
Upvotes: 1
Reputation: 887453
Don't take those lines out of Web.config.
Instead, set the references to Copy Local
and re-deploy.
Upvotes: 2