我在 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.
这肯定不正常,有人知道我该如何解决这个问题吗?
最佳答案
如果您的用户名中有空格,则会出现错误 - 请参阅 https://github.com/aspnet/Razor/issues/2406
对我有用的解决方案是将以下内容放入我的 csproj 文件
<PropertyGroup>
<!-- see https://github.com/aspnet/Razor/issues/2406 -->
<_RazorBuildServerPipeName>razor-issues-2406</_RazorBuildServerPipeName>
</PropertyGroup>
关于c# - 全新 ASP.NET Core 2.1 项目的构建时间缓慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50654690/