
If the package you are installing is dependent on other packages, NuGet installs them also if they are not already installed.

Files are copied to the solution, references might be added to the project, the project app.config or web.config file might be updated, etc. NuGet retrieves the package from the specified package source and installs it in the project that is selected in the Default project drop-down list (unless you specify a different project in the command). For example, enter the command Install-Package elmah as shown in the following example: Starting NuGet client 3.0 Beta or higher, these Get-Package commands can be replaced by Find-Package elmah or Fina-Package Logging.Īfter you have found a package that you want to install, use the Install Package command with the name of the package. It makes better sense to specify a filter.įor example, to find the logging package ELMAH, enter Get-Package-ListAvailable -Filter elmah (the name of the package) or Get-Package-Filter Logging-ListAvailable (a keyword in the package description).

Starting NuGet 3.0 Beta or higher, Get-Package also takes a -PageSize switch, which enables paging support for listing available packages from a package source.įor the default package source, that command is going to list thousands of packages. In the package manager console w indow, enter Get-Package-ListAvailable at the prompt to see a list of all packages that are available in the selected package source. When you enter commands, you can override these defaults. (The default value will be the first project in the solution, not necessarily the one you have selected in Solution Explorerwhen you open the window) In the Default project list, select the default project that you want your commands to work with.Typically you will leave this as its default value of NuGet official package source.

In the Package source list, select the default source (NuGet package feed) that you want your commands to use.The two drop-down lists set default values that let you omit parameters from the commands you enter in the window: The package manager console window is displayed. From the Tools menu, select Library Package Manager and then click Package Manager Console.
