项目构建停止:“构建延迟,直到Bower/npm软件包完成还原." [英] Project build halts on: "Build delayed until Bower/npm packages finish restoring."
问题描述
在VS 2017中,我使用Angular模板创建了一个新的ASP.NET Core Web应用程序.
In VS 2017, I created a new ASP.NET Core Web Application using the Angular template.
但是该项目没有运行,它卡在了:
The project however does not run, it gets stuck on:
Build delayed until Bower/npm packages finish restoring.
我看到有一个后台任务正在运行,但这一直持续下去,并且没有任何进展.
I see that a background task is running, but this goes on for ever and doesn't make any progress.
推荐答案
我遇到了类似的问题,并且按照以下步骤解决它.
I had a similar problem and I followed the below steps to get around it.
禁用软件包还原:
- 转到工具->选项->项目和解决方案-> Web软件包管理->软件包还原.
- 将在项目打开时还原"和在保存时还原"设置为False
禁用后,我打开了一个终端并手动安装了所有软件包.我使用Yarn安装软件包,没有遇到任何问题.
After disabling, I opened a terminal and manually installed all the packages. I used Yarn to install the packages and faced no problems.
由于超时,Visual Studio在项目构建期间通常会暂停.为了解决这个问题,我使用了命令yarn --network-timeout 60000
.
Visual Studio often halts during project builds because of timeouts. To get around that, I used the command yarn --network-timeout 60000
.
希望这会有所帮助!
这篇关于项目构建停止:“构建延迟,直到Bower/npm软件包完成还原."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!