简体   繁体   English

在Visual Studio 2019中键入时,如何获得IntelliSense提示第三方类?

[英]How get IntelliSense hints for 3rd party classes as you type in Visual Studio 2019?

Currently, I get no IntelliSense hints for classes that are in 3rd party packages that I have not yet imported with using . 目前,对于我尚未using第三方软件包中的类,我没有获得IntelliSense提示。

For example, if i type ConnectionMul I get no hints, so I have to instead type the entire classname ( ConnectionMultiplexer ) and then type Alt+Enter and only then does it suggest using StackExhange.Redis . 例如,如果我输入ConnectionMul我没有提示,所以我必须改为键入整个类名( ConnectionMultiplexer ),然后键入Alt+Enter ,然后才建议using StackExhange.Redis

I'm used to IntelliJ's hinting with Java. 我已经习惯了IntelliJ对Java的暗示。 When I have dependencies added to the project, I can just type Con and it will already have suggestions including the 3rd party classes. 当我将依赖项添加到项目中时,我可以输入Con并且它已经包含第3方类的建议。 Is there a way to do this in Visual Studio? 有没有办法在Visual Studio中执行此操作?

If you've already referenced the type in your project (via assembly or NuGet package), it should show up as a lightbulb action when you've typed a partial match: 如果您已经在项目中引用了类型(通过程序集或NuGet包),则在键入部分匹配时它应显示为灯泡操作:

显示通过灯泡动作完成类型名称的建议

However, it seems that this requires at least 5 charactes typed - when I try it with JObj I don't get the suggestion, but with JObje I do. 然而,似乎这需要至少5个字符键入 - 当我尝试使用JObj我没有得到建议,但是我用JObje做了。

There are also (for completeness) options under the C# language that suggest using statements from NuGet or the local reference assemblies path once you've typed out the type name: 在C#语言下还有(完整性)选项,建议在输入类型名称后使用NuGet语句或本地引用程序集路径:

工具 - >选项 - >文本编辑器 - > C# - >高级,显示'建议使用NuGet包中的类型'复选框

When this is turned on and you use a type not referenced in your project, you'll see a suggestion like this: 如果打开它并使用项目中未引用的类型,您将看到如下建议:

显示灯泡操作以从NuGet安装包

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

相关问题 Visual Studio 2019 IntelliSense 已更改(如何获取先前的行为?) - Visual Studio 2019 IntelliSense changed (how to get prior behavior?) Visual Studio 2019 智能感知替换 - Visual Studio 2019 Intellisense replace 第三方类的多态扩展 - polymorphic extension to 3rd party classes 如何重命名并公开第3方dll中的类型 - How to rename and exposes a type from the 3rd party dll 如何确定第三方类型实例方法是线程安全的? - How to determine a 3rd party type instance method is thread safe? 如何在 Visual Studio 中获取参数提示/完成? - How to get parameter hints/completion in Visual Studio? 更改第 3 方库类型的 TypeConverter - Changing TypeConverter of a 3rd party library type 在Visual Studio项目中使用3rd party exe,然后将其包装为一个用于在线安装程序 - Using 3rd party exe in visual studio project and then wrapping it into one for online installer 是否可以更改第三方类的“ Visual Studio调试器变量”窗口“值”列中显示的内容? - Is it possible to change what is displayed in a Visual Studio Debugger Variables window Value column for a 3rd party class? Visual Studio 2019 进入定义状态,Intellisense 不起作用 - Visual studio 2019 go to definition and Intellisense not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM