flipdoubt
flipdoubt

Reputation: 14465

DotNet CLI: Restore Nuget package without adding to project

We build our dotnet artifacts on a TeamCity server and want to include the SqlPackage.CommandLine binaries alongside our build output. Running dotnet add package SqlPackage.CommandLine yields "Could not find any projects in C:\build". Can someone recommend a way to grab the nuget output without adding it to a project?

Upvotes: 0

Views: 382

Answers (1)

Alexey Subach
Alexey Subach

Reputation: 12302

You can just download the NuGet package directly from nuget.org: curl -O -L https://www.nuget.org/api/v2/package/SqlPackage.CommandLine does the trick and downloads the latest version.

If you need the contents from that package, you can simply unarchive it with zip utils afterwards

Upvotes: 1

Related Questions