【发布时间】:2018-11-02 12:17:27
【问题描述】:
我正在使用 Angular 在 Azure DevOps(以前称为 VSTS)上为 .NET Core SPA 模板试验 CI/CD。我遇到了一个问题,在部署时,ClientApp 文件夹变成 wwwroot,存储在 Azure Web App 的 wwwroot 中。这意味着我现在有 2 个 wwwroot。
此外,由于文件夹混乱,以下块不再有效。
// In production, the Angular files will be served from this directory
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/dist";
});
设置起来很简单。只需使用 Visual Studio 创建一个新的 Web 应用程序项目,选择 Angular。然后运行ng update 一直移动到Angular 7。在此过程中应该为您生成一个angular.json 文件。
我尝试了很多东西,但都没有帮助。
【问题讨论】:
标签: angular .net-core azure-devops azure-pipelines angular7