NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 252 forks source link

NuGet does not download any packages #12976

Closed sirinath closed 9 months ago

sirinath commented 10 months ago

NuGet Product Used

dotnet.exe, NuGet.exe, Visual Studio Package Management UI, Visual Studio Package Manager Console

Product Version

6.7.0.127

Worked before?

NA

Impact

I'm unable to use this version

Repro Steps & Context

Run NuGet\Install-Package cTrader.Automate -Version 1.0.8

In console:

PM> NuGet\Install-Package cTrader.Automate -Version 1.0.8
Restoring packages for C:\Users\sirin\OneDrive\Documents\cAlgo\Sources\Robots\Grid Level Trading\Grid Level Trading\Grid Level Trading.csproj...
  GET https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0
  NotFound https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0 1797ms
Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0'.
Response status code does not indicate success: 404 (Not Found).
  GET https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0
  NotFound https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0 1607ms
Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0'.
Response status code does not indicate success: 404 (Not Found).
  GET https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0
  NotFound https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0 533ms
NuGet\Install-Package : NU1301: Failed to retrieve information about 'cTrader.Automate' from remote source 'https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0'.
At line:1 char:1
+ NuGet\Install-Package cTrader.Automate -Version 1.0.8
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

NuGet\Install-Package : Package restore failed. Rolling back package changes for 'Grid Level Trading'.
At line:1 char:1
+ NuGet\Install-Package cTrader.Automate -Version 1.0.8
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Time Elapsed: 00:00:07.9129059

In package manager:

[nuget.org] The V2 feed at 'https://www.nuget.org/Search()?$filter=IsAbsoluteLatestVersion&searchTerm='ctrader'&targetFramework='net6.0'&includePrerelease=true&$skip=0&$top=26&semVerLevel=2.0.0' returned an unexpected status code '404 Not Found'.
C:\Users\sirin\OneDrive\Documents\cAlgo\Sources\Robots\Grid Level Trading\Grid Level Trading>dotnet add package cTrader.Automate --version 1.0.8
  Determining projects to restore...
  Writing C:\Users\sirin\AppData\Local\Temp\tmp36A7.tmp
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 'cTrader.Automate' into project 'C:\Users\sirin\OneDrive\Documents\cAlgo\Sources\Robots\Grid Level Trading\Grid Level Trading\Grid Level Trading.csproj'.
info : Restoring packages for C:\Users\sirin\OneDrive\Documents\cAlgo\Sources\Robots\Grid Level Trading\Grid Level Trading\Grid Level Trading.csproj...
info :   GET https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0
info :   NotFound https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0 2400ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0'.
log  : Response status code does not indicate success: 404 (Not Found).
info :   GET https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0
info :   NotFound https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0 583ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0'.
log  : Response status code does not indicate success: 404 (Not Found).
info :   GET https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0
info :   NotFound https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0 581ms
error: NU1301: Failed to retrieve information about 'cTrader.Automate' from remote source 'https://nuget.org/FindPackagesById()?id='cTrader.Automate'&semVerLevel=2.0.0'.
info : Package 'cTrader.Automate' is compatible with all the specified frameworks in project 'C:\Users\sirin\OneDrive\Documents\cAlgo\Sources\Robots\Grid Level Trading\Grid Level Trading\Grid Level Trading.csproj'.
error: Value cannot be null. (Parameter 'version')

Usage: NuGet.CommandLine.XPlat.dll package add [options]

Options:
  -h|--help               Show help information
  --force-english-output  Forces the application to run using an invariant, English-based culture.
  --package               Id of the package to be added.
  --version               Version of the package to be added.
  -d|--dg-file            Path to the dependency graph file to be used to restore preview and compatibility check.
  -p|--project            Path to the project file.
  -f|--framework          Frameworks for which the package reference should be added.
  -n|--no-restore         Do not perform restore preview and compatibility check. The added package reference will be unconditional.
  -s|--source             Specifies NuGet package sources to use during the restore.
  --package-directory     Directory to restore packages in.
  --interactive           Allow the command to block and require manual action for operations like authentication.
  --prerelease            Allows prerelease packages to be installed.

Verbose Logs

No response

nkolev92 commented 10 months ago

Hey @sirinath, it looks like the source may have been misconfigured.

Can you please try using the V3 url from https://learn.microsoft.com/en-us/nuget/nuget-org/overview-nuget-org#api-endpoint-for-nugetorg

related: https://github.com/NuGet/NuGetGallery/issues/5771

ghost commented 10 months ago

This issue has been automatically marked as stale because we have not received a response in 14 days. It will be closed if no further activity occurs within another 14 days of this comment.