【问题标题】:Slow Build Time on Brand New ASP.NET Core 2.1 Project全新 ASP.NET Core 2.1 项目的构建时间缓慢
【发布时间】:2018-11-12 06:15:27
【问题描述】:

我在 Visual Studio 15.7.3 中创建了一个全新的 ASP.NET Core 2.1 应用程序。

新创建的应用程序的构建时间非常慢,大约为 20 秒。

尽我所能跟踪构建似乎在这里停滞不前:

1>    C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.extensions\2.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll
1>    '
1>    Server execution failed with response Rejected. For more info, check 
the server log file in the location specified by the RAZORBUILDSERVER_LOG 
environment variable.
1>    Fallback to in-process execution.

这肯定是不正常的,有谁知道我该如何解决这个问题?

【问题讨论】:

    标签: c# visual-studio asp.net-core build asp.net-core-2.1


    【解决方案1】:

    如果您的用户名中有空格,则会出现错误 - 请参阅 https://github.com/aspnet/Razor/issues/2406

    对我有用的解决方案是将以下内容放入我的 csproj 文件中

    <PropertyGroup>
      <!-- see https://github.com/aspnet/Razor/issues/2406 -->
      <_RazorBuildServerPipeName>razor-issues-2406</_RazorBuildServerPipeName>
    </PropertyGroup>
    

    【讨论】:

    • TL;DR:只有当您的用户名中有空格时,此修复才会使您受益。我的没有,也没有。
    • @Daz 您是否在 github 问题中添加了您的信息?
    • 我已经更新了答案,让它在哪里工作更清楚 - 谢谢@Daz
    猜你喜欢
    • 1970-01-01
    • 2021-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-22
    • 2017-05-25
    • 1970-01-01
    • 2020-08-19
    相关资源
    最近更新 更多