Rob
Rob

Reputation: 7217

NuGet - add a new package feed from command line

I have a scenario where im creating a build in VSTS. I don't have access to the VM hosting the Agent and it's not setup to include our internal package feed.

I do have access via the command line (powershell) - how do I add a new package feed to VS2017 via the command line? (or can I even do this)

Upvotes: 2

Views: 4870

Answers (1)

Andrei Prigorshnev
Andrei Prigorshnev

Reputation: 608

You can use:

nuget sources Add -Name "MyServer" -Source \\myserver\packages

See detailed reference here.
Or add the feed to file NuGet.config manually. You can find NuGet.config using the following path:

$env:APPDATA\NuGet\Nuget.config

Upvotes: 2

Related Questions