Skip to content

BUG, BUG, BUG (?). Azure Deploy From Source: Github -> error with Views on Areas. #6585

@Bartmax

Description

@Bartmax

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"
    ]
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions