Home > DeveloperSection > Forums > Do I need to install MVC 3/4 on web server to run mvc application?
John Smith

Total Post:101

Points:711
Posted on    September-29-2012 4:38 AM

 ASP.NET MVC ASP.NET MVC 
Ratings:


 1 Reply(s)
 3376  View(s)
Rate this:
I have a MVC 4 application and runs well on my Development 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?
Please help!!

Thanks
John


Uttam Misra

Total Post:124

Points:888
Posted on    September-29-2012 4:49 AM

You can run an MVC application without installing MVC in 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.

This will add assemblies (DLL files) to a Web site project or Web application project. When you deploy your Web site or application, the files are included in the deployed project. This is useful if applications or technologies that your project depends on are not already installed on the server that will host your Web project. For example, you can use this feature to deploy an ASP.NET MVC 3 Web application to a server that does not have ASP.NET MVC 3 installed.

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.



NOTE: 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.

Don't want to miss updates? Please click the below button!

Follow MindStick