Home: dotnet-nuget install

Created on 2 Jan 2018  路  6Comments  路  Source: NuGet/Home

dotnet nuget install Newtonsoft.Json

results in:

Specify --help for a list of available options and commands.
error: Unrecognized command or argument 'install'

nuget install Newtonsoft.Json

works.

Please add install subcommand to dotnet-nuget, so we have nicer way to use this feature in non-Windows platforms.

Duplicate Feature

Most helpful comment

@zhili1208, I don't understand how it's dupe of 5919? nuget.exe install is already a fact of life for serveral years, this request is to simply add install to dotnet-nuget.

dotnet nuget push -s <my-registry-endpoint> my-package.nupkg

works today, we need

dotnet nuget install -s <my-registry-endpoint> my-package

similar to

nuget install -Source <my-registry-endpoint> my-package

with explicit source, even without requiring to have NuGet.Config.

Please reconsider this.

All 6 comments

@livarcocc, is this a correct repo for this request?

Apparently, only push subcommand is available

dotnet nuget -h
NuGet Command Line 4.5.0.4

Usage: dotnet nuget [options] [command]

Options:
  -h|--help                   Show help information
  --version                   Show version information
  -v|--verbosity <verbosity>  The verbosity of logging to use. Allowed values: Debug, Verbose, Information, Minimal, Warning, Error.

Commands:
  delete  Deletes a package from the server.
  locals  Clears or lists local NuGet resources such as http requests cache, packages cache or machine-wide global packages folder.
  push    Pushes a package to the server and publishes it.

Use "dotnet nuget [command] --help" for more information about a command.

@kasper3 could you help me understand your request? you can restore newtonsoft.json package, why you need "install" command? thanks

@zhili1208, dotnet-cli is a standalone utility on Windows and Unix platforms. Using nuget.exe on Unix currently requires Mono.

dotnet nuget install will open the opportunity for many non-project scenarios, where consumer wants to pull up a package and use resources within.

In essence, currently we create a some.proj file with <PackageReference> followed by dotnet restore to achieve the same. With dotnet nuget install, we won't need this extra file creation step.

Note: not everything in nuget registries is related to project context, some packages have native utilities for example.

@zhili1208, I don't understand how it's dupe of 5919? nuget.exe install is already a fact of life for serveral years, this request is to simply add install to dotnet-nuget.

dotnet nuget push -s <my-registry-endpoint> my-package.nupkg

works today, we need

dotnet nuget install -s <my-registry-endpoint> my-package

similar to

nuget install -Source <my-registry-endpoint> my-package

with explicit source, even without requiring to have NuGet.Config.

Please reconsider this.

Was this page helpful?
0 / 5 - 0 ratings