nuget retrieving package metadata

Sultan picture Sultan · Nov 9, 2015 · Viewed 44.4k times · Source

An error occurred while retrieving package metadata for 'bootstrap.3.3.5' from source 'nuget.org'. ========== Finished ==========

Screenshot

Where the defect wonder Is site nuget.org may crash or whether the problem is local. I am using Visual Basic on Windows. The defect begins when he wishes to download entity framework package, but he does not accept the download nuget from the official website Package.

Is there an interpretation of what is happening?

meaning that when I use Visual Basic to design sites and dealing with databases through asp.net web application when I INSTALL a package through the attached nuget within Visual Basic, I was having errors that in the previous picture and knowing that I go to the page https://www.nuget.org asked Install NuGet . exe does not accept the download intent Is the problem in the computer or is it public to everyone.

An error occurred while retrieving package metadata for

I noticed there was a update for Visual Studio 2015 NuGet Package Manage for Visual Studio to version 3.1.60724.766 (from current 3.0.60624.657), so I downloaded and installed it. Same errors.

Fix

In Visual Studio 2015.

Tools Menu -> NuGet Package Manager -> Package Manager Settings

Click Package Sources

Click + sign

Add the following:

Name: something like NuGet v2

Source: https://www.nuget.org/api/v2/

Untick the current nuget.org so it should look like: look like

And now you should be able to install NuGet packages

&&

Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 3.0.0.0

Type 'get-help NuGet' to see all available NuGet commands.

PM> get-help NuGet TOPIC about_NuGet

SHORT DESCRIPTION Provides information about NuGet Package Manager commands.

LONG DESCRIPTION This topic describes the NuGet Package Manager commands. NuGet is an integrated package management tool for adding libraries and tools to .NET projects.

The following NuGet cmdlets are included.

    Cmdlet                  Description
    ------------------      ----------------------------------------------
    Find-Package            Get the set of packages available from the package source, 
                            based on the package Id/keyword. This is a new command that
                            will replace Get-Package -ListAvailable.

    Get-Package             Gets the set of installed packages. With -Updates switch, 
                            gets the set of package updates available from the package source.

    Install-Package         Installs a package and its dependencies into the project.

    Uninstall-Package       Uninstalls a package. If other packages depend on this package, 
                            the command will fail unless the –Force option is specified.

    Update-Package          Updates a package and its dependencies to a newer version.

    Sync-Package            Get the version of installed package from specified/default project
                            and sync the version to the rest of projects in the solution.

    Add-BindingRedirect     Examines all assemblies within the output path for a project
                            and adds binding redirects to the application (or web) 
                            configuration file where necessary.

    Get-Project             Returns a reference to the DTE (Development Tools Environment) 
                            for the specified project. If none is specifed, returns the 
                            default project selected in the Package Manager Console.

    Open-PackagePage        Open the browser pointing to ProjectUrl, LicenseUrl or 
                            ReportAbuseUrl of the specified package.

    Register-TabExpansion   Registers a tab expansion for the parameters of a command.

SEE ALSO Online documentation: ht tp://g o .m icrosoft . com / fwlink /? LinkID=206619 Find-Package Get-Package Install-Package Uninstall-Package Update-Package Sync-Package Add-BindingRedirect Get-Project Open-PackagePage Register-TabExpansion PM>

All this and still the service does not work

Answer

Hrvoje Matić picture Hrvoje Matić · Jun 3, 2016

It requires two steps (second is maybe optional, but I always like clean solution)

  1. In Explorer open folder where your project resides. Open packages.config using Notepad. Find and remove the line that mentions corrupted package name.

  2. Open folder where your solution resides. Open subfolder "packages". Find folder with corrupted package and remove it.

Note: If you delete wrong package, just enable NuGet restore in Visual studio "Options", and while enabled, right-click solution and select "Restore missing NuGet packages"