Use the NuGet Command Line

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

NuGet repositories must be prefixed with api/nuget in the path

When using the NuGet command line to access a repository through Artfactory, the repository URL must be prefixed with api/nuget in the path. This applies to all NuGet commands including nuget install and nuget push.

For example, if you are using Artifactory standalone or as a local service, you would access your NuGet repositories using the following URL:

http://localhost:8081/artifactory/api/nuget/<repository key>

Or, if you are using Artifactory Cloud the URL would be:

https://<server name>.jfrog.io/artifactory/api/nuget/<repository key>

Note

The NuGet install/delete will not work if there is a subfolder in the command (even if the NuGet push has a subfolder in its command).

To use the Nuget Command Line tool:

  1. Download NuGet.exe

  2. Place it in a well known location in your file system such as c:\utils.

  3. Make sure that NuGet.exe is in your path

For complete information on how to use the NuGet Command Line tool please refer to the NuGet Docs Command Line Reference.

First configure a new source URL pointing to Artifactory:

nuget sources Add -Name Artifactory -Source http://localhost:8081/artifactory/api/nuget/<repository key>

To use V3 requests, you need to Configure NuGet CLI with NuGet v3 API.