The view 'Index' or its master was not found

前端 未结 9 1434
南方客
南方客 2020-12-03 16:03

I\'m new to the C# MVC project type and when I created an empty C# MVC project, I noticed the following error:

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


        
9条回答
  •  鱼传尺愫
    2020-12-03 16:21

    You may have old/bad ASP.Net assemblies in your build.

    If you've made sure you have your Controller, namespace and View names all in the right place, there's a good chance your MVC/ASP Assembly is having problems working with the current Mono environment.

    If you've tried the tricks to copy all the .Net assemblies you can find and tag them into your bin, there's a good chance Mono or its configuration is not melding correctly - and you don't need to do that anymore. I had this problem when updating a machine to the latest Mono build. I wiped these assemblies from my bin, and NuGet'ed the latest assemblies in the Mono MVC Packages folder.

    First thing you'll see is:

    • Microsoft.AspNet.Mvc
    • Microsoft.AspNet.Infrastructure
    • Microsoft.AspNet.WebPages
    • Microsoft.AspNet.Razor

    This will resolve these problems.

提交回复
热议问题