为什么需要Visual Studio安装nuget?

卡斯特

我刚刚在代理后面安装了巧克力

$env:chocolateyProxyLocation = 'http://proxy.com:port'
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

并试图安装nuget软件包管理器

choco install nugetpackagemanager

为什么Nuget需要VS?我收到此错误:

 Chocolatey v0.10.13
Installing the following packages:
nugetpackagemanager
By installing you accept licenses for the packages.
Progress: Downloading NugetPackageManager 2.8.60318.667... 100%

NugetPackageManager v2.8.60318.667 [Approved]
nugetpackagemanager package files install completed. Performing other installation steps.
The package NugetPackageManager wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[N]o/[P]rint): y

ERROR: Visual Studio is not installed or the specified version is not present.
The install of nugetpackagemanager was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\NugetPackageManager\tools\chocolateyInstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - nugetpackagemanager (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\NugetPackageManager\tools\chocol
ateyInstall.ps1'.
 See log for details.
加里伊万公园

您是否有指向要安装的实际应用程序的链接?NuGet软件包管理器通常是一个已安装到Visual Studio中的应用程序(后来被移植到Visual Studio安装中)。因此,要安装此软件包:

https://chocolatey.org/packages/NugetPackageManager

您将需要安装Visual Studio,因为此工具旨在在Visual Studio中使用。

如果您实际上正在尝试安装NuGet.exe,则说明您使用了错误的软件包,而应该使用以下软件包:

https://chocolatey.org/packages/NuGet.CommandLine

或此处的NuGet包资源管理器:

https://chocolatey.org/packages/NugetPackageExplorer

更新:

关于评论:

软件包提供者需要“ PackageManagement”和“ Provider”标签。

在这种情况下,PackageManagement不是指NuGet程序包管理器,而是指:

https://www.powershellgallery.com/packages/PackageManagement/1.1.7.0

以前称为OneGet。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

为什么我们总是需要在Visual Studio中通过nuget安装efcore?

Visual Studio 2012离线安装nuget

为什么从Visual Studio部署Azure需要这么长时间?

为什么安装某些Python软件包需要Visual Studio?

是否需要为 Angular2 安装 Visual Studio?为什么?

在Visual Studio Code for Unity中安装Nuget程序包

如何在Visual Studio中使用Bower(从nuget安装)?

无法使用nuget在Visual Studio中安装MySql.Data

在 Visual Studio 2015 中使用 Nuget 安装白色错误

无法在Visual Studio 2015中安装需要Newtonsoft.Json.10.0.1的NuGet软件包

为什么在 Visual Studio 的 OpenCV 项目中使用 /MT 时仍然需要 dll?

为什么Visual Studio告诉我我需要引用System.Private.CoreLib?

为什么node-gyp(和其他东西)需要Visual Studio?

如何在不重新安装完整 NuGet 的情况下在 Visual Studio 中还原 NuGet 包

为什么需要安装中间CA

Tomcat为什么需要安装JDK?

为什么需要成对安装RAM?

为什么需要rvmsudo来安装乘客

为什么需要Python安装Cassandra

Visual Studio 2017中的Nuget安装会跳过名为“ Windows”的内容文件夹

尽管从 nuget 安装,msbuild + Visual Studio 执行错误的打字稿版本

Visual Studio 2017无法在.NET 4.7项目中安装nuget包

从Visual Studio NuGet管理器安装MailChimp.NET程序包

在Visual Studio 2019中重新安装Nuget软件包管理器

在未安装Visual Studio的计算机上运行nuget.exe

安装NuGet软件包而不在Visual Studio中添加任何引用

如何使用NuGet在Visual Studio 2012上安装protobuf-net?

链接错误:在Visual Studio中使用NuGet安装Boost zlib筛选器(2012)

无法在Visual Studio 2015中安装Nuget软件包管理器