Asp.net core mvc 布局视图'~/Views/Shared/_Layout.cshtml';找不到

Asp.net core mvc 布局视图'~/Views/Shared/_Layout.cshtml';找不到,asp.net-core-mvc,asp.net-mvc-areas,Asp.net Core Mvc,Asp.net Mvc Areas,下图显示了我正在处理的项目结构: 在Areas->Billing->Views->_viewstart.cshtml内部,我已经指定了要应用于整个应用程序的布局路径,但我一直收到以下错误: 错误: InvalidOperationException:找不到布局视图“~/Views/Shared/\u layout.cshtml”。搜索了以下地点: ~/Views/Shared/\u Layout.cshtml 布局路径 @{ Layout=“~/Views/Shared/_Layout.

下图显示了我正在处理的项目结构:

在Areas->Billing->Views->_viewstart.cshtml内部,我已经指定了要应用于整个应用程序的布局路径,但我一直收到以下错误:

  • 错误:
InvalidOperationException:找不到布局视图“~/Views/Shared/\u layout.cshtml”。搜索了以下地点: ~/Views/Shared/\u Layout.cshtml

  • 布局路径

    @{ Layout=“~/Views/Shared/_Layout.cshtml”; }


通过将布局移动到根文件夹,我找到了问题的解决方案,如下图所示: