< Back

Install-NuGetPackage

Sat Jan 18, 2020 6:44 pm

NAME Install-NuGetPackage



SYNOPSIS

A thin wrapper for "NuGet.exe install [...]". See https://docs.microsoft.com/en-us/nuget/ ... ef-install.





SYNTAX

Install-NuGetPackage [-NuGetExePath <String>] -PackageId <String> [-PackageVersion <String>] [-SolutionDirectory

<String>] [-OutputDirectory <String>] [-ConfigFile <String>] [-NoCache] [<CommonParameters>]



Install-NuGetPackage [-NuGetExePath <String>] -PackageConfigFile <String> [-SolutionDirectory <String>]

[-OutputDirectory <String>] [-ConfigFile <String>] [-NoCache] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-NuGetExePath <String>

Path to NuGet.exe. Defaults to "<current directory>\\.pentia\\nuget.exe".



Required? false

Position? named

Default value (Get-NuGetPath)

Accept pipeline input? false

Accept wildcard characters? false



-PackageId <String>

The package to install. Can't be used with "PackageConfigFile".



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PackageVersion <String>

The package version to install. Defaults to latest version.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PackageConfigFile <String>

The package.config file specifying which packages to install. Can't be used with "PackageId" and

"PackageVersion".



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SolutionDirectory <String>

Specifies the solution folder. Not valid when restoring packages for a solution.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OutputDirectory <String>

Specifies the folder in which packages are installed. If no folder is specified, the current folder is used.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ConfigFile <String>

The NuGet configuration file to apply. If not specified, %AppData%\\NuGet\\NuGet.Config is used.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NoCache [<SwitchParameter>]

Prevents NuGet from using packages from local machine caches.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS





RELATED LINKS