Skip to content

Save-Package fails to download dependencies #539

@Serenyrddraig

Description

@Serenyrddraig

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions