在 Windows 电脑上同时安装了 .NET Core SDK 1.0.4 与 2.0.0-preview1-005977 ,在 1.0.4 中每次执行 dotnet 命令(除了 dotnet -v )时,比如 dotnet restore 或 dotnet test ,都会出现下面的界面:
Configuring... ------------------- A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. Decompressing 100% 7788 ms Expanding 100% 23063 ms Failed to create prime the NuGet cache. new failed with: -2147352571
而在 2.0.0 Preview 1 中没这个问题。
临时解决方法:设置环境变量 DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1