NuGet Local Repository Layout

JFrog Artifactory Documentation

JFrog Artifactory
Content Type
User Guide

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.

To use a hierarchical layout for your repository you should define a Custom Layout. This way, different maintenance features like version cleanup will work correctly with NuGet packages.

Read More: JFrog Artifactory and NuGet Repositories

Placing packages to match your repository layout

Defining a Custom Layout for your repository does not force you to place your packages in the corresponding structure, however it is recommended to do so since it allows Artifactory to perform different maintenance tasks, such as version cleanup, automatically.

It is up to the developer to correctly deploy packages into the corresponding folder. From NuGet 2.5 you can push packages into a folder source as follows:

nuget push mypackage.1.0.0.nupkg -Source

Below is an example of a Custom Layout named nuget-default.

NuGet Custom Layout Configuration.jpg

In this example, the three fields that are mandatory for module identification are:

  • Organization = orgPath

  • Module = module

  • Base Revision (baseRev) is not a part of the layout hierarchy in this example, but it is included here as one of the required fields.

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 Global Configuration Descriptor:Artifactory Configuration Files


Since the package layout is in a corresponding folder hierarchy, the Artifactory Version Cleanup tool correctly detects previously installed versions.