Sdk: 1.0.4 CLI fails to create prime cache if 2.0.0-preview1-005972 version is installed as well

Created on 9 May 2017  路  10Comments  路  Source: dotnet/sdk

Steps to reproduce

  1. Install CLI version 1.0.4
  2. Install CLI version 2.0.0-preview1-005972
  3. Create a new project that targets netcoreapp1.0
  4. Add a global.json with contents { "sdk": {"version": "1.0.4"} }
  5. Run dotnet restore

Expected behavior

The first time experience behavior completes and prime cache is created successfully for version 1.0.4

Actual behavior

Failed to create prime the NuGet cache. new failed with: -2147352571

cc @livarcocc @mlorbetske @balachir

Most helpful comment

That feels like cheating. 馃槈

DOTNET_SKIP_FIRST_TIME_EXPERIENCE does make the problem "go away" for now. Thanks!

All 10 comments

Is there any workaround for this?

On my Mac, I had to remove ~/.config/NuGet/NuGet.Config (nuked ~/.nuget and ~/.dotnet as well)

This did not help me. Just having 2.0 preview 1 install breaks me without any known fix. I'm on Windows.

I removed ~/.nuget, ~/.dotnet, $env:APPDATA/NuGet/NuGet.config and set $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 to workaround this.

That feels like cheating. 馃槈

DOTNET_SKIP_FIRST_TIME_EXPERIENCE does make the problem "go away" for now. Thanks!

On my Mac, setting DOTNET_SKIP_FIRST_TIME_EXPERIENCE was also necessary to seemingly prevent repeated failure of repopulating the cache. I've got 1.0.1 and 2.0 Preview 1 installed and every dotnet restore resulted in something like this:

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% 7199 ms
Expanding 100% 129582 ms
Failed to create prime the NuGet cache. new failed with: 5

Looks like any version installed _after_ 2.0-preview is unable to get past the NuGet cache priming. :( Happening to me on osx and windows with different versions of the sdk

Is this first run running for the 1.0 CLI (which this bug addresses) or is this the 2.0 CLI running the first run and failing. If it is the 2.0 CLI, I would like to get more details, because I haven't seen it recently and we have tests around it. Which leads me to believe there is something in your machine causing it to fail. In that case I would like to understand it so that we can harden the first run logic.

@livarcocc this happens when you use the 2.0.0-* versions for playing around and then using 1.0.4 again through a global.json file (and nuking the nuget cache to trigger first run experience). I think the problem is that there is no public / "released" build of 1.0.* that contains dotnet/cli#6633 yet.

Ran into the same issue, DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 solved it for me too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

clairernovotny picture clairernovotny  路  3Comments

fmorriso picture fmorriso  路  3Comments

davkean picture davkean  路  3Comments

noelitoa picture noelitoa  路  3Comments

moozzyk picture moozzyk  路  3Comments