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

Save-Package fails to download dependencies #539

Open
Serenyrddraig opened this issue Nov 28, 2022 · 2 comments
Open

Save-Package fails to download dependencies #539

Serenyrddraig opened this issue Nov 28, 2022 · 2 comments

Comments

@Serenyrddraig
Copy link

I have the following PowerShell configuration

$PSVersionTable
Name Value


PSVersion 7.3.0
PSEdition Core
GitCommitId 7.3.0
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Get-PackageProvider
Name Version DynamicOptions


NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, …
PowerShellGet 2.2.5.0 PackageManagementProvider, Type, Sco…

Get-Module
ModuleType Version PreRelease Name ExportedCo
mmands


Manifest 7.0.0.0 Microsoft.PowerShell.Management {Add-Cont…
Manifest 7.0.0.0 Microsoft.PowerShell.Utility {Add-Memb…
Script 1.4.8.1 PackageManagement {Find-Pac…
Script 2.2.5 PowerShellGet {Find-Com…
Script 2.2.6 PSReadLine {Get-PSRe…

Whenever I try to use the Save-Package commandlet, the download fails due to dependencies. For example, downloading Autofac (this happens for any module I've tried, not just Autofac):

save-package Autofac -Path C:\Users\TheDoctor\source\repos\Test -ProviderName Nuget
WARNING: Unable to find dependent package(s) (Microsoft.NETCore.Platforms)
WARNING: Unable to find dependent package(s) (System.Formats.Asn1)
WARNING: Unable to find dependent package(s) (runtime.native.System.Net.Http)
WARNING: Unable to find dependent package(s) (System.Diagnostics.DiagnosticSource)
WARNING: Unable to find dependent package(s) (System.Net.Primitives)
WARNING: Unable to find dependent package(s) (System.Net.Sockets)
WARNING: Unable to find dependent package(s) (System.Diagnostics.Tools)
WARNING: Unable to find dependent package(s) (System.Numerics.Vectors)
WARNING: Unable to find dependent package(s) (System.Runtime.CompilerServices.Unsafe)
WARNING: Unable to find dependent package(s) (Microsoft.Bcl.AsyncInterfaces)
Save-Package: Unable to save the package 'Autofac.6.5.0.nupkg'.

The warnings take minutes to display. In most cases I've examined, the listed dependencies are available on nuget.org.

@Serenyrddraig
Copy link
Author

Another example of the problem I'm experiencing:

save-package Microsoft.EntityFrameworkCore -Path C:\Users\TheDoctor\source\repos\Test -ProviderName Nuget -RequiredVersion 6.0.10
WARNING: Dependency loop detected for package 'Microsoft.EntityFrameworkCore'.
Save-Package: Unable to save the package 'Microsoft.EntityFrameworkCore.6.0.10.nupkg'.

Error was reported after more than 20 minutes.

@Serenyrddraig
Copy link
Author

At least one operation succeeded. From the samples:
Save-Package -Name NuGet.Core -ProviderName NuGet -Path C:\LocalPkg

All other packages I've tried still fail as described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant