简体   繁体   English

在 Visual Studio 2017 中找不到 nuget 包管理器?

[英]Can't find the nuget package manager in visual studio 2017?

I installed package installer from Tools -> Extensions and Updates .我从Tools -> Extensions and Updates安装了包安装程序。 I tried searching in the tools menu, couldn't find install nuget package option.我尝试在工具菜单中搜索,找不到安装 nuget 包选项。 Also if I right click on the project, there is an option Quick Install Package , In the box there I fill in the nuget package I want to add in my project (openBLAS in my case) and it says, Visual studio needs to restart .此外,如果我右键单击该项目,则会有一个选项Quick Install Package ,在那里的框中填写我想添加到我的项目中的 nuget 包(在我的情况下为 openBLAS),并显示Visual Studio 需要重新启动

Iam working in Visual C++ win32 console application and tried finding the nuget package manager for other projects as well.我在 Visual C++ win32 控制台应用程序中工作,并尝试为其他项目找到 nuget 包管理器。

I restarted my visual studio and even my PC too, but still couldn't find it.我重新启动了我的视觉工作室,甚至我的电脑,但仍然找不到它。 Please help!请帮忙!

It's not installed by default(as far as I know) you have to select It in the Visual Studio Installer manually.它不是默认安装的(据我所知),您必须在 Visual Studio 安装程序中手动选择它。

First open up your Visual Studio installer (eg, via Tools->Get Tools and Features... ).首先打开您的 Visual Studio 安装程序(例如,通过Tools->Get Tools and Features... )。 Modify your currently installed product.修改您当前安装的产品。 You can find the NuGet package manager under the Individual components tab.您可以在单个组件选项卡下找到NuGet 包管理器

Can't find the nuget package manager in visual studio 2017?在 Visual Studio 2017 中找不到 nuget 包管理器?

As per nuget blog :根据nuget 博客

Starting with NuGet 4.0 in Visual Studio 2017, the NuGet Package Manager will be shipped as a part of Visual Studio, and newer versions will not be available for download from the VS extensions gallery.从 Visual Studio 2017 中的 NuGet 4.0 开始,NuGet 包管理器将作为 Visual Studio 的一部分提供,更新版本将无法从 VS 扩展库下载。 NuGet updates will be pulled in automatically along with other Visual Studio updates. NuGet 更新将与其他 Visual Studio 更新一起自动拉入。

So the NuGet Package Manager extension is already built-in Visual Studio 2017, do not have to install or update it.所以NuGet 包管理器扩展已经内置在 Visual Studio 2017 中,不必安装或更新它。

After install the Visual Studio 2017, you can use nuget package manager directly.安装 Visual Studio 2017 后,可以直接使用 nuget 包管理器。 Right click on the project, there is an option Manager NuGet packages... , In the Browse there filled in the openBLAS nuget package, then select the package version and install it:右键项目,有一个选项Manager NuGet packages... ,在Browse里面填上openBLAS nuget包,然后选择包版本并安装:

在此处输入图片说明

Besides, you can also install the nuget package by NuGet commands directly within Visual Studio, for more detail information you can refer to the NuGet Documentation .此外,您还可以直接在 Visual Studio 中通过 NuGet 命令安装 nuget 包,有关更多详细信息,您可以参考NuGet 文档

This worked for me:这对我有用:

Delete %AppData%\\NuGet\\Nuget.config then Restart Visual Studio删除%AppData%\\NuGet\\Nuget.config然后重新启动 Visual Studio

(Deleting the Nuget.config forces VS to create a new config file, this can solve many different problems depending on what was broken in your config file) (删除 Nuget.config 会强制 VS 创建一个新的配置文件,这可以解决许多不同的问题,具体取决于配置文件中的损坏内容)

My experience with VS2017 is that NuGet Package Manager was not automatically installed.我对 VS2017 的经验是 NuGet 包管理器没有自动安装。 It had to be selected via the VS Installer:必须通过 VS 安装程序选择它:

在此处输入图片说明

Failing to select/install these on the initial install, I had to go back and add/install them later.未能在初始安装时选择/安装这些,我不得不稍后返回并添加/安装它们。 However, after installing, the Package Sources in the NuGet Package Manager were limited to "Microsoft Visual Studio Offline Packages" and package restore would not function correctly.但是,安装后,NuGet 包管理器中的包源仅限于“Microsoft Visual Studio 脱机包”,并且包还原无法正常运行。 Following the suggestion of @ndreisg, I deleted the Nuget.config file.按照@ndreisg 的建议,我删除了 Nuget.config 文件。 Then upon restart of VS2017, everything worked, and I was able to restore packages to an existing solution.然后在重新启动 VS2017 后,一切正常,我能够将包恢复到现有解决方案。

I was using Visual Studio 2017 Community and couldn't find the NuGet Pkg Manager in the Tool menu.我使用的是 Visual Studio 2017 社区,但在“工具”菜单中找不到 NuGet Pkg 管理器。 I went to Tools->Extensions & Updates... Selected Visual Studio Update and that launched the Visual Studio Installer.我去了工具->扩展和更新...选择了 Visual Studio 更新并启动了 Visual Studio 安装程序。 After it run the update the NuGet Package Manager menu was added..运行更新后,添加了 NuGet 包管理器菜单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2017上的NuGet包“ opencvdefault”链接错误 - NuGet package “opencvdefault” link error on Visual Studio 2017 Visual Studio 2017 找不到 windows.h - Visual Studio 2017 can't find windows.h Visual Studio 2017找不到std :: variant - Visual Studio 2017 can't find std::variant Visual Studio 2017 - 找不到 Visual C++ Windows 窗体 - Visual Studio 2017 - can't find Visual C++ Windows Forms 在新的 Visual Studio 2017 社区项目中找不到 stdio.h - can't find stdio.h in new Visual Studio 2017 Community project 在Visual Studio 2017中使用Qt库的CMake项目:在运行exe时找不到Qt dll - CMake project using Qt libraries in Visual Studio 2017: can't find Qt dll when running the exe 如何在Visual Studio 2013中的C ++项目中编译和链接谷歌测试,但是NuGet包管理器安装了Gtest? - How to compile and link google tests in C++ project in Visual Studio 2013 but with Gtest installed by NuGet Package Manager? 无法在Visual Studio 2017中的共享项目中创建文件夹 - Can't create folder inside Shared project in Visual Studio 2017 无法使用Visual Studio 2017编译静态库项目 - Can't compile the static library project with visual studio 2017 如果有 std::thread,Visual Studio 2017 linux 将无法编译 - Visual Studio 2017 linux can't compile if there's std::thread
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM