FBryant87
FBryant87

Reputation: 4605

Is there a way to install a nuget package without creating a csproj?

I'm looking through the dotnet CLI and nuget CLI to see if there's anything which will download a package from a feed, without having to do a restore against a csproj file.

The reason for this is I have a pipeline which needs to download a nuget package to use something inside it, but I've no application so no need for a csproj.

Is it possible in the command line to simply say: "Download this nuget package to this location?"

Needs to be via nuget because the nuget feed is already configured with an ADO token (trying to avoid having to manage credentials).

Upvotes: 1

Views: 734

Answers (1)

Uuuuuumm
Uuuuuumm

Reputation: 657

You are probably looking for the nuget CLI (download here)

Once you have downloaded the CLI, you can install packages like so:

nuget install NewtonSoft.Json

Here is the reference I used

Upvotes: 1

Related Questions