如何在Linux上从命令行安装NuGet [英] How to install NuGet from command line on linux

查看:1202
本文介绍了如何在Linux上从命令行安装NuGet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在基于Linux的计算机上安装NuGet.在Windows计算机上使用以下命令时,它可以正常工作.

I need to install NuGet on Linux based machine.When am using the following command in Windows machine it works fine.

获取安装包.config

但是我无法在linux机器上做到这一点,如何实现呢?

But I am unable to do this with linux machine, how to achieve this?

推荐答案

一旦执行了(有些烦人)安装步骤,就可以从

Once you've followed the (somewhat annoying) install steps to get .Net core installed and the apt repo setup from https://www.microsoft.com/net/core, you can just do this:

sudo apt install nuget

,您将在本地计算机上工作一个nuget:

and you'll have a working nuget on your local machine:

$ 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.

请注意,在撰写本文时, not 不会运行nuget update -self,尽管它将成功安装较新版本的nuget,但该版本实际上不会运行.

Notice that as of the time of writing do not run nuget update -self, as although it will successfully install a more recent version of nuget, that version won't actually run.

如果您将其破坏,则始终可以将其吹走并重新安装:

If you do break it though, you can always just blow it away and reinstall:

sudo apt remove nuget
sudo apt install nuget

这篇关于如何在Linux上从命令行安装NuGet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆