Home: Error occurred while restoring Nuget Packages: The given key was not present in the dictionary.

Created on 25 Oct 2016  路  12Comments  路  Source: NuGet/Home

Most helpful comment

Getting this error now on VS 2017, patch 15.4 on a project that was created using dotnet new webapi. Nuget worked for a while and now gives this error. It keeps doing so after restarting VS.

All 12 comments

@rrelyea, creating this for tracking purpose.

this was fixed by @jainaashish - find the right issue to dupe too.

Dupe of #3724 - had to do with no Guid in the .csproj. Fixed in Dev. Will be checked in mega-insertion.

Getting this error now on VS 2017, patch 15.4 on a project that was created using dotnet new webapi. Nuget worked for a while and now gives this error. It keeps doing so after restarting VS.

Same here, with VS 2017, patch 15.4.

Same error me too with VS2017 15.4. Could someone please update.

What a PITA, the whole nuget process is a mess recently. Especially solutions that mix csproj of .NET Framework, .NET Standard and .NET Core. And now this..

Still actual... Please reopen!

Got the same now, also see this:
"Error: Assets file 'myproject\objproject.assets.json' not found. Run a NuGet package restore to generate this file.", This happens even after having done a restore.
Happens in C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets 323

Restoring reports all is fine:
Restoring NuGet packages...
All packages are already installed and there is nothing to restore.

Except that it also gives this
Error occurred while restoring NuGet packages: The given key was not present in the dictionary.
which comes after it has said it has finished.......

Some screenshots:
image

image

I had the same problem and updating VS 2017 solved it.

Was this page helpful?
0 / 5 - 0 ratings