OidcProxy.Net icon indicating copy to clipboard operation
OidcProxy.Net copied to clipboard

Nuget Error: The given key was not present in the dictionary

Open ProPotential opened this issue 1 year ago • 2 comments

Using Visual Studio 2022 v 17.12.0 Preview 3 Installed the templates and generated the Angular project. Trying to restore NuGet packages displays an error: The given key was not present in the dictionary. I also tried adding the OidcProxy.Net.OpenIdConnect 5.1.5 to an existing project and got the same error. Has anyone else seen this?

ProPotential avatar Oct 28 '24 21:10 ProPotential

Additional info. I tried removing both Spa packages, deleted the obj and bin folder and tried installing from a console:

C:\Dev\PC3\OidcProxy.Net.EntraID>dotnet add package OidcProxy.Net.EntraId Build succeeded in 0.8s info : X.509 certificate chain validation will use the default trust store selected by .NET for code signing. info : X.509 certificate chain validation will use the default trust store selected by .NET for timestamping. info : Adding PackageReference for package 'OidcProxy.Net.EntraId' into project 'C:\Dev\PC3\PC3 v1.3\Penteon\OidcProxy.Net.EntraID\OidcProxy.net.csproj'. info : GET https://api.nuget.org/v3/registration5-gz-semver2/oidcproxy.net.entraid/index.json info : OK https://api.nuget.org/v3/registration5-gz-semver2/oidcproxy.net.entraid/index.json 279ms info : Restoring packages for C:\Dev\PC3\OidcProxy.Net.EntraID\OidcProxy.net.csproj... error: The given key '0' was not present in the dictionary.

Same results with: OidcProxy.Net.OpenIdConnect 5.1.5 I was able to get the package added into a new WebApi project however.

ProPotential avatar Oct 28 '24 22:10 ProPotential

When I got this error it was because the name of my own project had the exact same name as the package I was trying to restore from NuGet.

davidkarlsson avatar Feb 08 '25 06:02 davidkarlsson