如何从nuget使用.NET Core从命令行下载软件包? [英] How do I download a package from the command line with .NET Core from nuget?
问题描述
Microsoft软件包 Linux上的.NET Core 对于Ubuntu。我目前正在使用。现在,我想安装 Json.NET ,它指示我使用 Package Manager控制台并运行,
Microsoft packages .NET Core on Linux for Ubuntu. I'm currently using that. I now want to install Json.NET which instructs me to use the Package Manager console and run,
PM> Install-Package Newtonsoft.Json
我想知道如何使用Linux。我看到有一个 Nuget CLI ,但是.NET Core上似乎没有该功能。 此外,文档说的是
I'm wondering how I do that Linux. I see that there is a Nuget CLI, but it doesn't seem like that's available on .NET Core. Moreover the docs say
在Mac和Linux上,安装Mono 4.4.2或更高版本。
On Mac and Linux, install Mono 4.4.2 or later.
如何简单地在Linux上安装软件包? NET相当于npm / cpan / pip / gem是什么?
How do I simply install a package on Linux? What's the .NET equivalent of npm/cpan/pip/gem?
当我运行 dotnet nuget
时, install
命令似乎丢失。
When I run dotnet nuget
, the install
command seems to be missing.
NuGet Command Line 4.3.0.5
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.
推荐答案
dotnet添加程序包-帮助
dotnet添加软件包Newtonsoft.Json
请参考github页面 https://github.com/dotnet/docs/blob/master/docs/core/tools/dotnet-add-package.md 了解详情。
Please refer to the github page https://github.com/dotnet/docs/blob/master/docs/core/tools/dotnet-add-package.md for more details.
这篇关于如何从nuget使用.NET Core从命令行下载软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!