Home: Can't Install-Package from NuGet, reports as Not Found

Created on 24 Jun 2015  路  9Comments  路  Source: NuGet/Home

PM> Install-Package Mandrill
Attempting to gather dependencies information for package 'Mandrill.2.1.4' with respect to project targeting '.NETFramework, Version=v4.5'

Install-Package : Package 'Mandrill' is not found
At line:1 char:1
+ Install-Package Mandrill
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Confusingly, Find-Package returns the package.

PM> Find-Package Mandrill
Id                                  Versions                                 Description                                                                                                                                                                  
--                                  --------                                 -----------                                                                                                                                                                  
Mandrill                            {2.1.4}                                  Mandrill .Net is a quick and easy wrapper for getting started with the Mandrill API.     

Not sure whether this has to do with the package being published unsuccessfully or whether NuGet is acting up.
Applies to this package only (so far), but all versions.

Also filed at Mandrill as https://github.com/shawnmclean/Mandrill-dotnet/issues/145

Most helpful comment

Workaround: Try adding https://www.nuget.org/api/v2/ as another source. (@emgarten)

All 9 comments

I'm managing to download Mandrill just fine (both from nuget.exe and with the Install-Package command).

Please re-open if you can still see this issue, and if you can provide more specific repro steps.

image

I'm able to install it with nuget.exe but not with Install-Package. Using Visual Studio 2015 RC, opening a new Console Application, going to Package Manager Console and executing Install-Package Mandrill gives the initially reported results.

Not working, checking the reviews at VisualStudio Gallery it seems it IS a general problem. https://visualstudiogallery.msdn.microsoft.com/5d345edc-2e2d-4a9c-b73b-d53956dc458d
Are you guys aware of the problem? ETA on a fix? Thanks.

Workaround: Try adding https://www.nuget.org/api/v2/ as another source. (@emgarten)

Found out that nuget.exe is loosing trailing zeros of a version.
Like: it will try to download v x.xx.xx.0 by using "<...>x.xx.xx" url. Which will result with 404 status code.
API v3

packages>
package id="" version="1.4.12.0" targetFramework="net46" />
packages>

[GET] https://<...>.myget.org/F/default/api/v3/flatcontainer//1.4.12/.1.4.12.nupkg

That looks like a bug in myget - v3 requires normalization. Will loop them in

Can you contact [email protected]?

Is this resolved ? I am also getting a same error as mentioned below. Can someone help me

install-package ReportGenerator
install-package : An error occurred while retrieving package metadata for 'ReportGenerator' from source 'Microsoft and .NET'.
At line:1 char:1

  • install-package ReportGenerator
  • ~~~~~~~

    • CategoryInfo : NotSpecified: (:) [Install-Package], Exception

    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Looks like you are using the filtered source which have this package (as expected), look at your source configuration (gear button on the top right of the ui) and make sure https://API.nuget.org/v3/index.json exists and is enabled. You can also disable the redundant source on the bottom (Microsoft and .Net)

Was this page helpful?
0 / 5 - 0 ratings