Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

PowerShell reference

  • 2021-04-22
Feedback

In this article

The Package Manager Console provides a PowerShell interface within Visual Studio on Windows to interact with NuGet through the specific commands listed below. (The console is not presently available in Visual Studio for Mac.) For a guide to using the console, seeInstall and manage packages using Package Manager Console topic.

Tip

All PowerShell commands relate only to package consumption. No PowerShell commands relate to creating and publishing packages except to the extent that a package can also be a consumer of other packages.

Important

The commands listed here are specific to the Package Manager Console in Visual Studio, and differ from thePackage Management module commands that are available in a general PowerShell environment. Specifically, each environment has commands that are not available in the other, and commands with the same name may also differ in their specific arguments. When using the Package Management Console in Visual Studio, the commands and arguments documented in this present topic apply.

Common CommandsDescriptionNuGet Version
Install-PackageInstalls a package and its dependencies into the project.All
Update-PackageUpdates a package and its dependencies, or all packages in a project.All
Find-PackageSearches a package source using a package ID or keywords.3.0+
Get-PackageRetrieves the list of packages installed in the local repository, or lists packages available from a package source.All
Secondary CommandsDescriptionNuGet Version
Add-BindingRedirectExamines all assemblies within the output path for a project and adds binding redirects to theapp.config orweb.config where necessary.All
Get-ProjectDisplays information about the default or specified project.3.0+
Open-PackagePageLaunches the default browser with the project, license, or report abuse URL for the specified package.Deprecated in 3.0+
Register-TabExpansionRegisters a tab expansion for the parameters of a command, allowing you to create customized expansions for commonly-used parameter values.All
Sync-PackageGet the version of installed package from specified project and syncs the version to the rest of projects in the solution.3.0+
Uninstall-PackageRemoves a package from a project, optionally removing its dependencies.All

For complete, detailed help on any of these commands within the console, just run the following with the command name in question:

Get-Help <command> -full

All Package Manager Console commands support the followingcommon PowerShell parameters:

  • Debug
  • ErrorAction
  • ErrorVariable
  • OutBuffer
  • OutVariable
  • PipelineVariable
  • Verbose
  • WarningAction
  • WarningVariable

For details, refer toabout_CommonParameters in the PowerShell documentation.


Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo