How do I solve a “view not found” exception in asp.net core mvc project

前端 未结 16 1977
梦毁少年i
梦毁少年i 2020-12-09 15:53

I\'m trying to create a ASP.NET Core MVC test app running on OSX using VS Code. I\'m getting a \'view not found\' exception when accessing the default Home/index (or any oth

16条回答
  •  青春惊慌失措
    2020-12-09 16:14

    I had this error on Ubuntu Linux and was trying to run it from the CLI for the first time, so I fixed it by running the dotnet build command with sudo dotnet build, so it turned out to be a permissions issue and the app started fine with dotnet bin/Debug/netcoreapp2.0/MyApp.dll. Sadly the build command didn't notify about the permissions issue.

提交回复
热议问题