c# - 按 Ctrl+Dot 时出现 Visual Studio Community 2017 "add package"

标签 c# .net visual-studio visual-studio-2017 visual-studio-community

在 Visual Studio Community 2015 Update 3 中,当你有一个项目中不存在的类型时,VS 将搜索包源并给出“添加包 xxx”建议,如下所示: VS2015 feature

但是在VS2017 Community中,这个功能没有了。有没有打开它的选项?或者它被完全删除了?为什么?

最佳答案

默认关闭,需要在VS2017中开启。

来自 here :

Add using/Imports for types in reference assemblies/NuGet packages – if you type an unrecognized type, we will search for it in your reference assemblies and on NuGet.org and offer a quick fix to add the using/Imports. This feature is off by default; to enable it go to Tools > Options > Text Editor > [C#/Basic] > Advanced > Suggest usings for types in reference assemblies and Suggest usings for types in NuGet packages. Enabling the latter option will download 10 MB of a NuGet index on your machine and it will take several seconds to complete (this will not affect your workflow in VS, but it does means you cannot immediately use the feature once enabling it).

enter image description here

关于c# - 按 Ctrl+Dot 时出现 Visual Studio Community 2017 "add package",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42830851/

相关文章:

C# - 如何在具有创建日期的目录中生成文件名和子目录的列表

c# - 通过命令行在 Windows CE 和 Windows Mobile 设备上导入根证书

c# - 如果在类外调用方法,如何生成编译器警告?

visual-studio - Visual Studio Ultimate 试用版的缺点

c# - System.Data.SqlClient.SqlException : 'Incorrect syntax near ' `'.'

c# - 从 Azure 机器人调用 Web API

c# - 如何在 C# 中获取当前用户的桌面路径?

c# - 如何在不在 C# Windows 应用程序中创建父类的新实例的情况下返回父窗体

.net - 设计器 View 中Windows窗体控件中的错误

visual-studio - Visual Studio 2015 企业更新 2 iso