如何在 Visual Studio 2010 中安装 NuGet 包管理器?

问题描述 投票:0回答:1

如何在 Visual Studio 2010 中安装 NuGet 包管理器?

我已经尝试了两种选择,但都没有奏效。

首先,我尝试从以下 URL 安装 nuget.tools:https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManager。 然而,我收到了这个错误消息

2/17/2023 11:24:03 AM - Microsoft VSIX Installer
2/17/2023 11:24:03 AM - -------------------------------------------
2/17/2023 11:24:03 AM - vsixinstaller.exe version:
2/17/2023 11:24:03 AM - 17.4.2120
2/17/2023 11:24:03 AM - -------------------------------------------
2/17/2023 11:24:03 AM - Command line parameters:
2/17/2023 11:24:03 AM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\xxxx\Downloads\NuGet.Tools (2010).vsix
2/17/2023 11:24:03 AM - -------------------------------------------
2/17/2023 11:24:03 AM - Microsoft VSIX Installer
2/17/2023 11:24:03 AM - -------------------------------------------
2/17/2023 11:24:04 AM - Initializing Install...
2/17/2023 11:24:05 AM - Extension Details...
2/17/2023 11:24:05 AM -     Identifier         : NuPackToolsVsix.Microsoft.67e54e40-0ae3-42c5-a949-fddf5739e7a5
2/17/2023 11:24:05 AM -     Name               : NuGet Package Manager
2/17/2023 11:24:05 AM -     Author             : Microsoft Corporation
2/17/2023 11:24:05 AM -     Version            : 2.8.60318.667
2/17/2023 11:24:05 AM -     Description        : A collection of tools to automate the process of downloading, installing, upgrading, configuring, and removing packages from a VS Project.
2/17/2023 11:24:05 AM -     Locale             : en-US
2/17/2023 11:24:05 AM -     MoreInfoURL        : http://docs.nuget.org/
2/17/2023 11:24:05 AM -     InstalledByMSI     : False
2/17/2023 11:24:05 AM -     SupportedFrameworkVersionRange : [4.0,4.5]
2/17/2023 11:24:05 AM - 
2/17/2023 11:24:05 AM -     SignatureState     : ValidSignature
2/17/2023 11:24:05 AM -     SignedBy           : Microsoft Corporation
2/17/2023 11:24:05 AM -     Certificate Info   : 
2/17/2023 11:24:05 AM -         -------------------------------------------------------
2/17/2023 11:24:05 AM -         [Subject]       : CN=Microsoft Corporation, OU=MOPR, OU=OPC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
2/17/2023 11:24:05 AM -         [Issuer]        : CN=Microsoft Code Signing PCA, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
2/17/2023 11:24:05 AM -         [Serial Number] : 33000000CC776171D4B17BA1280001000000CC
2/17/2023 11:24:05 AM -         [Not Before]    : 4/23/2014 1:39:04 AM
2/17/2023 11:24:05 AM -         [Not After]     : 7/23/2015 1:39:04 AM
2/17/2023 11:24:05 AM -         [Thumbprint]    : 9DD77A79F7124D8DB128A526833CF3760FCB7794
2/17/2023 11:24:05 AM - 
2/17/2023 11:24:05 AM -     Supported Products : 
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.Pro
2/17/2023 11:24:05 AM -             Version : [10.0,11.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.Pro
2/17/2023 11:24:05 AM -             Version : [11.0,12.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.IntegratedShell
2/17/2023 11:24:05 AM -             Version : [10.0,11.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.IntegratedShell
2/17/2023 11:24:05 AM -             Version : [11.0,12.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.VWDExpress
2/17/2023 11:24:05 AM -             Version : [10.0,11.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.VWDExpress
2/17/2023 11:24:05 AM -             Version : [11.0,12.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.VPDExpress
2/17/2023 11:24:05 AM -             Version : [11.0,12.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.VSWinExpress
2/17/2023 11:24:05 AM -             Version : [11.0,12.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM -         Microsoft.VisualStudio.VSWinDesktopExpress
2/17/2023 11:24:05 AM -             Version : [11.0,12.0)
2/17/2023 11:24:05 AM -             ProductArchitecture : x86
2/17/2023 11:24:05 AM - 
2/17/2023 11:24:05 AM -     References         : 
2/17/2023 11:24:05 AM - Signature Details...
2/17/2023 11:24:05 AM -     Extension is signed with a valid signature.
2/17/2023 11:24:05 AM - 
2/17/2023 11:24:05 AM - Searching for applicable products...
2/17/2023 11:24:05 AM - Found installed product - Visual Studio Professional 2022
2/17/2023 11:24:05 AM - Found installed product - Visual Studio Professional 2019
2/17/2023 11:24:05 AM - Found installed product - Global Location
2/17/2023 11:24:05 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
   at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()


其次,我尝试从扩展管理器安装它, 但我收到了错误消息

Cannot search for online extensions because an error occurred while trying to contact the server

我发现的在线论坛都无法帮助解决这两个问题。

c# .net visual-studio visual-studio-2010
1个回答
0
投票

1.下载NuGet.Tools.vsix。 https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManager

2.将 vsix 文件拖放到 C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\VSIXInstaller.exe。

© www.soinside.com 2019 - 2024. All rights reserved.