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
In my case, the build action was somehow changed to Embedded resource which is not included in published files.
Changing Embedded resource
to Content
resolves my issue.
Im my case it simply was a "forget" error...
I had the folder with view not named the same as the controller name.
Renamed the folder to the correct name.. and works...
FWIW, In our case we received this error when accessing localhost:<port>/graphql
even though the View/GraphQL/Index.cshtml
was in the right place. We got the error because wwwroot/bundle.js
and wwwroot/style.js
was mistakenly not initially committed, since our .gitignore
included wwwroot
. Discovered it by inspecting the network traffic and seeing it was these files giving the 404 and not the Index.cshtml
itself.
I am using VS2017. In my case there was the view file at the proper place (with the proper name). Then I remembered that I renamed it before, (and the VS somehow did not asked me if I wanna change all the references as usual). So I finally deleted the view, then I made it again, and this solved my problem.