Original issue: dotnet/aspnetcore#1639
When publising to an azure website using the azure portal / deploy from source:Github.
All files get in their corresponding folders except Views inside the Areas folder.
trying to hit an Area enpoint result in the following error:
An unhandled exception occurred while processing the request.
InvalidOperationException: The view 'Index' was not found.
The following locations were searched:
/Areas/Admin/Views/Home/Index.cshtml
Looking at the filesystem i found the views are in folder: C:\home\site\repository\src\****\Areas\Admin\Views\ but not in: d:\home\site\wwwroot\Areas\Admin\Views
so manually invoking this command fixes the problem:
xcopy C:\home\site\repository\src\****\Areas\Admin\Views\
d:\home\site\wwwroot\Areas\Admin\Views /s
project.json:
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},