Whenever I set-up a new site, I like to organise my views into a few folders...  mainly one called 'pages' and one called 'Blocks'.


I create my Models and ViewModels, the controller creates a folder in my 'Views' folder under 'Pages' or 'Blocks' and then go to test out the site and get the same error:

The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:

The reasons this happens is that by default MVC will look for a view with a matching name of a controller in a view folder.  In an EPi project to make your solution neater.

It's good practice to split these views up into page, blocks etc.  In order to do this you will need to create a custom class that inherits from the RazorViewEngine and adds in the 'Pages' and 'Blocks' folder, this can be done with this code snippet:

using System.Web.Mvc;

The only thing left is to now register your custom view engine with MVC in your global.ascx