Manage Packages with NuGet CLI

  • 2 minutes to read

The NuGet CLI is a command line tool that allows you to install, create, publish, and manage NuGet packages.

Add DevExpress NuGet Packages to a Project

You can use a feed authorization key or NuGet feed URL to add NuGet packages to your project. For more information on these approaches, refer to the sections below.

Feed Authorization Key

The following command installs a package into the current project. Specify the credentials to complete the installation:

  • Username: DevExpress
  • Password: specify your feed authorization key
> nuget install DevExtreme.AspNet.Core -Source -Source
Feeds used:

Installing package 'DevExtreme.AspNet.Core' to '\WebApplication5'.
MSBuild auto-detection: using msbuild version '' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin'.
  OK 504ms
Please provide credentials for:
UserName: DevExpress
Password: {your-feed-authorization-key}

NuGet Feed URL

This approach uses a NuGet feed URL to specify the package source for installed NuGet packages.

# Add DevExtreme.AspNet.Core to the current project
nuget install DevExtreme.AspNet.Core -Source{your-feed-authorization-key}/api -Source

Common Commands

The sample below illustrates different console inputs that allow you to manage NuGet packages.

# Update all packages in the project
# You can omit the `{your-feed-authorization-key}` URL part, if you have your credentials saved in Windows Credentials 
# **Control Panel** → **User Accounts** → **Credential Manager** → **Windows Credentials**
nuget update -Source{your-feed-authorization-key}/api -Source

# Update the DevExtreme.AspNet.Core package
nuget update -Id DevExtreme.AspNet.Core -Source{your-feed-authorization-key}/api -Source

# Remove the DevExtreme.AspNet.Core package
nuget delete DevExtreme.AspNet.Core

# Install missing packages
dotnet restore -s{your-feed-authorization-key}/api -s

Refer to Microsoft documentation for more information on NuGet CLI and its commands: NuGet CLI Reference.