Artifactory support for NuGet provides:
To enable NuGet package metadata calculation on local repositories, select the "Packages" tab and check "Enable NuGet Support".
Local Repository Layout
To support a more manageable repository layout, you may store NuGet packages inside folders that correspond to the package structure.
Artifactory will find your packages by performing a property search so the folder hierarchy does not impact performance.
In this example, the three fields that are mandatory for module identification are:
You can configure this Custom Layout as displayed in the image above, or simply copy the below code snippet into the relevant section in your Artifactory Central Configuration (Admin tab > Advanced > Config Descriptor):
Since the package layout is in a corresponding folder hierarchy, the Artifactory Version Cleanup tool correctly detects previously installed versions.
Publishing to a Local Repository
When selecting a NuGet repository in the Tree Browser, Artifactory displays a corresponding code snippet that you can use to configure Visual Studio or your NuGet client to use the selected repository to publish or resolve artifacts.
When working with remote NuGet repositories, your Artifactory configuration depends on how the remote repositories are set up.
Different NuGet server implementations may provide package resources on different paths, therefore the feed and download resource locations in Artifactory are customizable when proxying a remote NuGet repository.
Here are some examples:
A Virtual Repository defined in Artifactory aggregates packages from both local and remote repositories.
This allows you to access both locally hosted NuGet packages and remote proxied NuGet libraries from a single URL defined for the virtual repository.
To define a virtual repository for NuGet, check "Enable NuGet Support" in the "Packages" tab.
Accessing NuGet Repositories from Visual Studio
Artifactory exposes its NuGet resources via the REST API at the following URL:
This URL handles all NuGet related requests (search, download, upload, delete) and supports both V1 and V2 requests.
To configure the NuGet Visual Studio Extension to use Artifactory, check the corresponding repositories in the "Options" window:
Using the NuGet Command Line
To use the Nuget Command Line tool:
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 API Key Authentication
NuGet tools require that sensitive operations such as push and delete are authenticated with the server using an
Anonymous Access to NuGet Repositories
By default, Artifactory allows anonymous access to NuGet repositories. This is defined under Security | General Configuration. For details please refer to Allow Anonymous Access.
Working Without Anonymous Access
In order to be able to trace how users interact with your repositories we recommend that you uncheck the Allow Anonymous Access setting described above. This means that users will be required to enter their user name and password when using their NuGet clients.
You can configure your NuGet client to require a username and password using the following command:
You can verify that your setting has taken effect by checking that the following segment appears in your
Allowing Anonymous Access
From version 3.2 Artifactory supports NuGet repositories with Allow Anonymous Access enabled.
When Allow Anonymous Access is enabled, Artifactory will not query the NuGet client for authentication parameters by default, so you need to indicate to Artifactory to request authentication parameters in a different way.
You can override the default behavior by setting the
Viewing Individual NuGet Package Information
You can view all the metadata annotating a NuGet package by choosing the NuPkg file in Artifactory's tree browser and selecting the