Add all the Umbraco folders and files to the MVC project.
Inspect and merge the web.config file from Umbraco project to the MVC project.
Add the Umbraco dlls (bin folder of Umbraco) as references into the MVC project.
Update the defaultRenderingEngine setting in config/umbracoSettings.config from WebForms to Mvc.
Run the project for Umbraco installation to start. Follow the steps indicated in the setup.
The admin interface works like charm (of cource I had to add <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> to appsettings). However when I preview pages, the master layout does not seem to apply
Remember to mark the answer as solution in case anyone else has the problem.
Regarding KendoUI - do you possibly have the dll's for Kendo that compile against MVC4 ? They should have an MVC3 compatible version, which you will now need.
Your solutions indeed looks very clean. However when I tried to add SurfaceControllers in the MVC project (Umbraco.Extensions), the application cannot resolve the views. Of course this is expected but have you tried anything like "VirtualPathProvider" or would you advise just copying the view into the CMS project (Umbraco.Site) on very build.
Can we use VS 2012 MVC project template with 4.11
Hello,
I have been trying to play around with using ASP.NET MVC 4 project templates for running Umbraco 4.11. This is what I have done:
The admin interface works like charm (of cource I had to add <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> to appsettings). However when I preview pages, the master layout does not seem to apply
I know many of you would be asking the question, why do you have to do this? The answer is, I would like to use KendoUI MVC wrappers.
Any help will be greatly appreciated.
Warm regards,
Krishna
Hi Krishna
I believe we're only working up to MVC 3 at the minute.
You should still be able to start an MVC project in VS2012 although the default is 4, but it has to be MVC3 to work with Umbraco.
Many thanks Richard,
Yes indeed I tried MVC 4 in the hope I could avoid alttemplate for Mobile site. However I shall try MVC 3.
Warm regards,
Krishna
Let me know how it goes - good luck
Hello Richard,
Seems to be working. Thanks for your time. Somehow I cannot get KenDoUi MVC wrappers working with it though.
Warm regards,
Krishna
Remember to mark the answer as solution in case anyone else has the problem.
Regarding KendoUI - do you possibly have the dll's for Kendo that compile against MVC4 ? They should have an MVC3 compatible version, which you will now need.
Hello Richard,
I did mark it as a solution immediately after my reply.
Regarding KendoUI, I have sorted it out. Perhaps there was a minor typo. I just copied the code again from their examples and that got it working.
Warm regards,KrishnaHey Krishna, would you mind sharing your MVC-project/soultion? Im trying to the same as you but I cant seem to make it work...
Hello David,
Please provide your email address and I can send in the sample project.
Warm regards,Krishnathanks a lot, you can email me at [email protected]
thanks again!
Krishna, did you forget about me? :)
Hello David,
Sorry have been busy but I have now shared the sample project via dropbox.
Warm regards,KrishnaTo make this a bit easier, I've just created this (make sure to wattch the screencast as well): http://our.umbraco.org/projects/developer-tools/umbraco-visual-studio-project
Hello Sebastiaan,
Your solutions indeed looks very clean. However when I tried to add SurfaceControllers in the MVC project (Umbraco.Extensions), the application cannot resolve the views. Of course this is expected but have you tried anything like "VirtualPathProvider" or would you advise just copying the view into the CMS project (Umbraco.Site) on very build.
Warm regards,Krishna@Kirshna I have an example with a very simple SurfaceController over here: https://dl.dropbox.com/u/3006713/SurfaceController4111.zip
is working on a reply...