ARTIFACTORY: Why Artifactory Uses NuGet’s V2 Protocol Instead of V3 When the Client is Sending API V3 Requests

ARTIFACTORY: Why Artifactory Uses NuGet’s V2 Protocol Instead of V3 When the Client is Sending API V3 Requests

AuthorFullName__c
Shai Ben-Zvi
articleNumber
000004167
ft:sourceType
Salesforce
FirstPublishedDate
2018-06-11T09:25:52Z
lastModifiedDate
2024-03-10T07:47:46Z
VersionNumber
6

To work with the NuGet v3 API, you'll have to make sure that you're using Artifactory version 6.0 or above. Additionally, for full semver2 support, we recommend that you use NuGet client version 4.3.x or above.

To work with NuGet V3, you'll have add the following:

NuGet CLI

  1. Make sure that your NuGet.config file contains protocolVersion=”3” to the relevant sources. On Windows, the default location of this file is %appdata%NuGetNuGet.Config and, on Mac, it's ~/.config/NuGet/NuGet.Config.

Here's a sample configuration that will work against a virtual NuGet repository, called nuget:
 

<add key=”ArtifactortyV3” value=”https://localhost:8081/artifactory/api/nuget/v3/nuget” protocolVersion=”3” />

 

User-added image

  1. As above, the same holds true for local, remote, and virtual repositories. Changes will point the NuGet client to the v3 feed of the repository and you can test it in your browser:

User-added image