[英]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语句或本地引用程序集路径:
When this is turned on and you use a type not referenced in your project, you'll see a suggestion like this: 如果打开它并使用项目中未引用的类型,您将看到如下建议:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.