The view 'Index' or its master was not found.

I've had this problem a few times before and it can be any of the other answers, but it can also be the Build Action that is causing the issue.

If you right click on the .cshtml/.vbhtml file that you are having a problem with, select Properties, and in the properties window set the Build Action to Content then this can be a solution to your problem.


MVC looks for views (like Index) under the views folder but they also have to be under a folder named after their controller (with a few exceptions like partials).

So this is the structure you want to follow in your project

Controllers (folder)
    HomeController (.cs)
    AccountController (.cs)

Views (folder)
    Home (folder)
        Index (.cshtml)
    Account (folder)
        Index (.cshtml)