全新 ASP.NET 核心 2.1 项目的构建时间缓慢
Slow Build Time on Brand New ASP.NET Core 2.1 Project
我在 visual studio 15.7.3 中创建了一个全新的 ASP.NET 核心 2.1 应用程序。
新创建的应用程序的构建时间非常慢,大约需要 20 秒。
尽我所能跟踪构建它似乎停滞在这里:
1> C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.extensions.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.
这肯定不正常,有人知道我该如何解决这个问题吗?
如果您的用户名中有空格,则会出现错误 - 请参阅 https://github.com/aspnet/Razor/issues/2406
对我有用的解决方案是将以下内容放入我的 csproj 文件
<PropertyGroup>
<!-- see https://github.com/aspnet/Razor/issues/2406 -->
<_RazorBuildServerPipeName>razor-issues-2406</_RazorBuildServerPipeName>
</PropertyGroup>
我在 visual studio 15.7.3 中创建了一个全新的 ASP.NET 核心 2.1 应用程序。
新创建的应用程序的构建时间非常慢,大约需要 20 秒。
尽我所能跟踪构建它似乎停滞在这里:
1> C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.extensions.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.
这肯定不正常,有人知道我该如何解决这个问题吗?
如果您的用户名中有空格,则会出现错误 - 请参阅 https://github.com/aspnet/Razor/issues/2406
对我有用的解决方案是将以下内容放入我的 csproj 文件
<PropertyGroup>
<!-- see https://github.com/aspnet/Razor/issues/2406 -->
<_RazorBuildServerPipeName>razor-issues-2406</_RazorBuildServerPipeName>
</PropertyGroup>