I’ve a MVC 4 application and runs well on my DEV Machine where I installed MVC 4 extension for VS 2010.
When deploying to the web server with IIS 7, do I need to install MVC 4 or should the dll included on my project is sufficient?
The reason I’m asking is we need to provide the requirement to infrastructure team.
Thanks.
You can run an MVC application without installing MVC on your server. There is something called deployable dependency in Visual studio. That will publish your MVC DLLs in your bin folder when you publish it.
from the msdn page,
Right Click on Project and Select Add Deployable Dependency from the context menu
Select what all DLLs you want to be published
After clicking OK, You will see a new folder called _bin_deployableAssemblies. You can do normal Publishing procedure now and you will have the dlls in the bin folder of the publish output.
Check this post for more details http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx
You should have Visual Studio 2010 SP1. Otherwise it will not be shown in the context menu when you right click on the project to be published.
EDIT :
As of MVC4, all necessary assemblies to run an MVC application are automatically added to the bin directory, and any MVC4 application is bin-deployable (means you can run it in a server without explicitly installing MVC) . For this reason, the Include Deployable Assemblies dialog has been removed from Visual Studio 2012