NuGet protocol commands
You must configure the NuGet protocol for Helix Artifacts before you can use the NuGet commands. For information on cofiguring the NuGet protocol for Helix Artifacts, see NuGet setup.
Use the NuGet commands to work with NuGet artifacts and resources in Helix Artifacts.
Pushing an artifact
To push an artifact, use the nuget push command. For example, to push p4api.net.x64.2019.2.185.9614.nupkg:
nuget push p4api.net.x64.2019.2.185.9614.nupkg
Fetching an artifact
To fetch an artifact, use the nuget install command. For example, to fetch the NuGet.config artifact:
nuget install -NoCache -ConfigFile NuGet.Config
Searching for an artifact
To search for an artifact, use the nuget search command. For example, to search for the p4api.net.x64.2019.2.185.9614.nupkg artifact:
nuget search p4api -source http://host:1604/nuget/NuGetStore/v3/index.json
Helix Artifacts responds with:
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="p4api.net.x64" version="2019.2.185.9614" targetFramework="net46" /> </packages>
Deleting an artifact
To delete an artifact, use the nuget delete command. Using the -NonInteractive flag does not prompt for confirmation to delete the artifact.
For example, to delete the p4api.net.x64 2019.2.185.9614.nupkg artifact:
nuget delete p4api.net.x64 2019.2.185.9614 -NonInteractive
Getting NuGet resources
For example, to get NuGet V3 resources:
GET http://helix-artifacts:1604/nuget/sampleNuGet/v3/index.json
Helix Artifacts responds with:
{ "resources": [ { "@id": "http://helix-artifacts:1604/nuget/sampleNuGet/v3-flatcontainer/", "@type": "PackageBaseAddress/3.0.0", "comment": "Base URL of Helix Artifacts storage for NuGet packages..." }, { "@id": "http://helix-artifacts:1604/nuget/sampleNuGet/api/v2/package", "@type": "PackagePublish/2.0.0" }, { "@id": "http://helix-artifacts:1604/nuget/sampleNuGet/v3/registration/", "@type": "RegistrationsBaseUrl", "comment": "Base URL of Helix Artifacts storage, where NuGet package..." }, ...