Getting Errors After Deploying your Application?
After deploying your application, you might see the following error message…
Could not load file or assembly ‘System.Web.Mvc, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.
This is due to the MVC binaries not being installed in the GAC on the server. But do not fret, the GAC is optional for MVC 3! To get your application to work properly, the necessary DLLs must be published to the application’s bin directory. Visual Studio 2010 provides a simple way to deploy the needed dlls. Here’s how:
1) Right click on your project and click on “Add Deployable Dependencies”. You should see the following dialog box:
2) Depending on your project, click the appropriate dependency. Once you click OK, you should see a new folder, _bin_deployableAssemblies in your project tree.
3) Deploy your application as you normally would and Visual Studio 2010 will now deploy all the listed DLLs onto the server.
Note that you can also use the same method to deploy SQL CE 4.0 dlls.