通过 PowerShell 脚本安装 NuGet [英] Install NuGet via PowerShell script
本文介绍了通过 PowerShell 脚本安装 NuGet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据我所知,NuGet 是作为 Visual Studio 扩展安装的:
As far as I can tell, NuGet is meant to be installed as a Visual Studio extension:
http://docs.nuget.org/docs/start-here/installing-nuget
但是如果我在没有安装 VS 的机器上需要 NuGet 怎么办?
But what if I need NuGet on a machine that doesn't have VS installed?
具体来说,我想使用 PowerShell 脚本安装 NuGet.
Specifically, I would like to install NuGet with a PowerShell script.
推荐答案
- 以管理员权限运行 Powershell
- 为 TLS12 键入以下 PowerShell 安全协议命令:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
这篇关于通过 PowerShell 脚本安装 NuGet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文