Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
150 views
in Technique[技术] by (71.8m points)

asp.net mvc - MVC Areas not render _Layout

I have the MVC project with .NET CORE 2.2
I add Areas in my project it work properly when in the local machine.

I setup CI CD pipeline with Azure Devops, when the application is published successfully. I notice my Areas is not render properly, this below is from azurewebsites.

Screen Shot

And this below is display when i debug locally, can someone help. where goes wrong

Screen Shot

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The issue is on .csproj It include this line, i got no idea how it add this in csproj. but when i removed from the csproj it work properly.

<ItemGroup>
    <Content Remove="AreasAdminViews\_ViewImports.cshtml" />
    <Content Remove="AreasAdminViews\_ViewStart.cshtml" />
    <Content Remove="AreasAdminViewsShared\_Layout.cshtml" />
    <Content Remove="ViewsShared\_Layout.cshtml" />
  </ItemGroup>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...