How to use Kentico CMS 7 with MVC4?

Kentico Support asked on January 14, 2014 19:39

How to use Kentico CMS 7 with MVC4?

Correct Answer

Kentico Support answered on January 14, 2014 19:39

You need to update the references to a newer version as follows:
1. Remove references:
SystemWeb.Mvc
SystemWeb.Razor
SystemWeb.WebPages
SystemWeb.WebPages.Deployment
SystemWeb.WebPages.Razor


2. Add references (Assemblies -> Extensions). Choose the system assemblies, not their CMS versions:
SystemWeb.Mvc – 4.0
SystemWeb.Razor – 2.0
SystemWeb.WebPages – 2.0
SystemWeb.WebPages.Deployment - 2.0
SystemWeb.WebPages.Razor – 2.0


3. Remove the view engine registration (not necessary for Razor views):
App_Code/Application/CMSAppBase.cs
//CMSWebFormViewEngine.RegisterViewEngine();


4. Update MVC version in the Web.Config:
<add assembly="System.Web.Mvc, Version=4.0.0.0, ...

-rm-
0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.