Skip to content
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

Error in Package Manager Console #7633

Open
Blue1992 opened this issue Dec 13, 2018 · 2 comments
Open

Error in Package Manager Console #7633

Blue1992 opened this issue Dec 13, 2018 · 2 comments
Labels
Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Triage:NeedsMoreInfo

Comments

@Blue1992
Copy link

Hello

For days and days I have been struggling with the following: In the Package Manager Console (VS 2017), I get the following error when trying to do this:

Install-Package Microsoft.AspNet.Providers.LocalDB -Version 2.0.1.

The error is: 'Unable to find version 2.0.1 of Microsoft.AspNet.Providers.LocalDB'. According to the discussion here, version 2.0.1 is a nonsense. Instead, it is recommended that version 2.0.0 be installed. I simply tried:

Install-Package Microsoft.AspNet.Providers.LocalDB (without the version)

I have Package source as nuget.org and under Default project I can see the name of my project.

This is the message I get in Package Manager Console: PM> Install-Package Microsoft.AspNet.Providers.LocalDB
Install-Package : Some NuGet packages are missing from the solution. The packages need to be restored in order to build the dependency graph. Restore the packages before performing any operations.
At line:1 char:1

  • Install-Package Microsoft.AspNet.Providers.LocalDB
  •   + CategoryInfo          : InvalidOperation: (:) [Install-Pac
    
    

Since the 'packages need to be restored', I clicked on the Restore button, only to get the same old error as before:
'Unable to find version 2.0.1 of Microsoft.AspNet.Providers.LocalDB'.
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages:Package Microsoft.AspNet.Providers.LocalDB.2.0.1' is not
found on source C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'.
https://api.nuget.org/v3/index.json: Package Microsoft.AspNet.Providers.LocalDB.2.0.1' is not found on source https://api.nuget.org/v3/index.json'.

In Tools | Package Manager | Manage Settings I have put a tick alongside:

Allow NuGet to download missing packages
Automatically check for missing packages
Press 'Clear all cache' button.

then restarted my PC and my project in VS 2017, but still get that 'Unable to find version 2.0.1......' error
message.

Where do I go from here, please?

Thank you.

@jainaashish
Copy link
Contributor

It seems the bottom of the issue is you already have a NuGet dependency on Microsoft.AspNet.Providers.LocalDB Version 2.0.1 in your current project. So when you try to restore the existing project it fails to get this package from any of the sources. Now I'm not sure how did you get this packages added in your project. This package could be a direct dependency in your project or a transitive dependency coming through another package or project (PackageReference)

If you are using Packages.config file to manage your NuGet dependencies then look inside that file, and you'll find this package Microsoft.AspNet.Providers.LocalDB there. As a workaround, delete this package line from this file as well as remove any place containing Microsoft.AspNet.Providers.LocalDB word in your project file (.csproj file). And then try to restore.

@Blue1992
Copy link
Author

Many thanks Jainaashish
You have cracked it! I deleted LocalDB from my Packages.config file and restarted VS 2017. Then I did this: Install-Package Microsoft.AspNet.Providers.LocalDB and got this (as it should):

Successfully installed 'Microsoft.AspNet.Providers.LocalDB 2.0.0'

Thanks again!

@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Pipeline:Icebox labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Triage:NeedsMoreInfo
Projects
None yet
Development

No branches or pull requests

5 participants