The current application I’m working on requires me to publish an MVC 3 Razor web application. I’m using sFTP as the protocol to my hosting provider. After the first publish I was unable to run the application. It kept throwing errors that I was missing assemblies. The first error I got was that the application was missing the Microsoft.Web.Infrastructure.dll. I added that DLL into the references and set it to copy local. Knowing that the copy local would allow me to publish the dll into the applications Bin directory.
This worked for only that DLL. I then got anther error of another missing dll: System.Web.Mvc.dll. After this I did a few searches to see what the issue was. I noticed a few posts mentioning these issues when the hosting provider did not MVC installed. To get around this there are a few suggestions. I read Hanselman’s post regarding bin publishing.
At first I added a folder in the bin directory called _bin_assemblies. I added the following DLL’s. (you can get them as a zip file here)