New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to create prime the NuGet cache. new failed with: -2147352571 #8154
Comments
@mlorbetske can you take a look at this one? Seems like dotnet new in the command failing with access denied. |
@livarcocc I can repro this with the 1.0.1 CLI & running through Powershell but not with the 2.0 CLI running through Powershell. Still investigating. |
@livarcocc actually - it seems that VS had locked an assembly in the package cache (%userprofile%.nuget\packages\system.runtime\4.3.0\ref\netstandard1.5\System.Runtime.dll) causing the restore to fail. Running the script above produces the following with the lock released
|
@mlorbetske Do we know which part of VS locked this assembly? Should we move this bug to NuGet? |
@livarcocc unfortunately no, I'm not sure why the assembly was locked. Without more to go on, I'm not certain if it's actionable for NuGet, but they may have seen something like this before & have some ideas. |
I'm running into the same issue with 1.0.3. I also have version 2.0 installed as well, FWIW. |
I'm seeing this issue, too, on Windows, even with VS closed. The exit code is different on macOS, but after installing 2.0.0 CLI, the first-time NuGet cache warmup fails when using the 1.0.x CLI via global.json. |
We have turned the fallback folder off temporarily in the 2.0 CLI. Meanwhile, let's use dotnet/cli#6647 to make sure that when we turn it back on, 1.0 cache priming will still work. |
In which repo is that issue? I get a 404 for this one. |
I see the same |
@astegmaier you are hitting https://github.com/dotnet/cli/issues/6550#issuecomment-302593348. In that case, you need to remove 2.0, run the first run for 1.0 and then add 2.0 back. I have a PR out though that will fix this. |
Thanks, uninstall 2.0.0-preview1-005977 can works. |
@livarcocc a bit of a necro-bump, but what is the proper solution for this now? I have 2.0.2 and 1.0.3 installed and it fails for me on 1.0.3 |
For 1.0.3, I would suggest uninstalling 2.0.2, running the first experience on 1.0.3 and then putting 2.0.2 back. And I am sorry for the trouble. Or you could get 1.1.4, where this was fixed and remove 1.0.3. Or, if you don't care about first run, just turn it off with DOTNET_SKIP_FIRST_TIME_EXPERIENCE=false. |
was getting same issue and was able to work around by executing |
Steps to reproduce
Install 2.0.0-preview1 SDK
Expected behavior
The package cache is populated.
The restore succeeds.
Subsequent restores are fast.
Actual behavior
The package cache is decompressed and expanded, but then fails:
Failed to create prime the NuGet cache. new failed with: -2147352571
The restore succeeds, but it takes about 45 seconds every time.
I think the error message also suffers a correction without having removed the corrected verb. It'd probably be either create or prime, but not both.
Environment data
dotnet --info
output:The error is in fact 0x80020005 (Access denied) but the same thing happens running this from an elevated PowerShell terminal.
Removing the preview SDK, the cache is primed again properly on first try.
I haven't tried this (yet) on any other 2.0.0-* SDK other than the nightly mentioned. I'll probably download a newer one once I'll need 2.0 again.
The text was updated successfully, but these errors were encountered: