Loads a NuGet package DLL, downloading as needed.
Add-NugetPackage.ps1 [-PackageName] <String> [[-TypeName] <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Add-NugetPackage.ps1 Serilog ; [Serilog.Core.Logger]::None -is [Serilog.ILogger]
True
The name of the NuGet package to load.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Use this type name to test whether the package was loaded.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Install-Package isn’t working for arbitrary NuGet packages, so this allows us access the main DLL assembly and types within the package.