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

前端 未结 16 1974
梦毁少年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:03

    For anyone struggling with this, I had a different problem than all the above. My local version worked fine, but the live production version gave this error. It turned out the Unix filenames were different from the ones showing in Windows.

    Git has a nasty setting that's enabled by default: core.ignorecasegit ( you can check this setting on the commandline with config --get core.ignorecase)

    The solution was to rename the files to something else (e.g. xxx.cs ), commit and push, then rename them back to original with the correct casing/capitalization and commit and push again.

提交回复
热议问题