【问题标题】:.NET Core Angular 7 SPA VSTS Deploy.NET Core Angular 7 SPA VSTS 部署
【发布时间】: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


    【解决方案1】:

    问题已解决。我向 .csproj 添加了条件,但忘记包含环境/构建变量。它导致 npm 无法运行。无赖。

    【讨论】:

      猜你喜欢
      • 2018-07-08
      • 2019-05-07
      • 1970-01-01
      • 2020-07-16
      • 2018-03-27
      • 2021-08-17
      • 1970-01-01
      • 1970-01-01
      • 2020-09-15
      相关资源
      最近更新 更多