Skip to content

anypackage/nuget

Repository files navigation

AnyPackage.NuGet

gallery-image build-image cf-image

NuGet provider for AnyPackage.

Install AnyPackage.NuGet

Install-PSResource AnyPackage.NuGet

Import AnyPackage.NuGet

Import-Module AnyPackage.NuGet

Sample usages

Find available packages

Find-Package -Name System.Management.Automation

Get installed packages

Gets installed packages from the NuGet global packages directory.

Get-Package

Install packages

Installs packages to the NuGet global packages directory.

Install-Package -Name System.Management.Automation

Install packages with specified framework

Install-Package -Name Avalonia -Provider NuGet -Framework netstandard2.0

Install packages with dependency behavior

Install-Package -Name Avalonia -Provider NuGet -DependencyBehavior Highest

Save packages

Saves packages to a directory.

Save-Package -Name System.Management.Automation -Path C:\Temp

Get registered package sources

Get-PackageSource

Register package source

$params = @{
    Name            = 'nuget.org'
    Location        = 'https://api.nuget.org/v3/index.json'
    Provider        = 'NuGet'
    ProtocolVersion = 3
}

Register-PackageSource @params

Set package source

Set-PackageSource -Name nuget.org -Location url

Unregister package source

Unregister-PackageSource -Name nuget.org