我需要在基于Linux的机器上安装NuGet.当我在Windows机器上使用以下命令时,它工作正常.
nuget安装packages.config
但我无法用linux机器做到这一点,如何实现呢?
Dou*_*oug 51
一旦你按照(有点烦人的)安装步骤安装.Net core和https://www.microsoft.com/net/core上的apt repo设置,你就可以这样做:
sudo apt install nuget
Run Code Online (Sandbox Code Playgroud)
你将在本地机器上有一个工作的nuget:
$ cat /etc/issue
Ubuntu 16.04.1 LTS \n \l
$ nuget
NuGet Version: 2.8.7.0
usage: NuGet <command> [args] [options]
Type 'NuGet help <command>' for help on a specific command.
Run Code Online (Sandbox Code Playgroud)
请注意,截至编写时不运行nuget update -self
,因为虽然它将成功安装更新版本的nuget,但该版本实际上不会运行.
如果你确实打破它,你可以随时将它吹走并重新安装:
sudo apt remove nuget
sudo apt install nuget
Run Code Online (Sandbox Code Playgroud)
ole*_*egz 23
安装mono,下载nuget:
sudo apt-get install mono-complete
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
之后再运行它mono nuget.exe
.
War*_*rad 14
nuget apt包在linux上不起作用,而exe用于windows.如果你想运行nuget,最简单的方法就是使用单声道包装器.
sudo apt-get install mono-complete
//download nuget.exe
mono nuget.exe install
Run Code Online (Sandbox Code Playgroud)