IntelliSense中的属性/方法列表不完整 [英] Incomplete list of properties/methods in IntelliSense

查看:98
本文介绍了IntelliSense中的属性/方法列表不完整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio Community 2017中使用VB.NET.我注意到在某些情况下,对象的可用属性和方法列表不完整.

I am using VB.NET in Visual Studio Community 2017. I noticed that in some cases the list of available properties and methods for an object is incomplete.

在这里可以看到一个示例:

One example can be seen here:

如图所示,我想使用dgv对象的RowCount属性,该属性的类型为System.Windows.Forms.DataGridView.您会看到,在它的上方,该属性就在那里并且可以正常工作,我可以手动输入它.在后台编译器(由于缺乏更好的术语)确认它是正确的之前,只需要花费一两秒钟的时间.这种行为使打字流程变得混乱,因为IntelliSense通常会自动更正它认为是错别字的内容.

As depicted, I want to use the RowCount property of the dgv object, that is of type System.Windows.Forms.DataGridView. You can see, that right above it the property is there and working fine, I can just type it by hand. It just takes a second or two, before the background compiler (for lack of better term) acknowledges it as correct. The behavior messes up the typing flow, since often IntelliSense autocorrects what it perceives as typos.

注意:这并非显示的属性所独有.我在其他示例中以及在函数调用和其他随机位置中都注意到了这一点,但是我找不到丢失和不丢失的清晰方法.

Note: This is not exclusive to the shown property. I noticed it for other examples, and also in function calls and other random places, but I could not find a clear methodology of what is missing and what isn't.

环顾四周,我发现这个问题,但是它处理的是完全不同的问题.

Looking around I found e.g. this question, however it deals with a completely different problem.

这仅仅是Visual Studio中的一个错误吗(如果是,它是在某个地方报告的吗?),有人可以确认这一点,并且有人知道此修复程序吗?

Is this just a bug in Visual Studio (and if so, is it reported somewhere?), can someone confirm this, and does someone know of a fix?

推荐答案

Albano Gheller在

Albano Gheller posted an answer on the Visual Studio Community page.

引用他和所需的修复步骤:

To quote him and the required step for a fix:

I've fixed the problem in this way:

1. I've exported my settings from Tool - Import/Export settings
2. I've set the property HideAdvancedMembers = true inside
   <ToolsOptionsSubCategory name="Basic" RegisteredName="Basic" PackageName="Text Management Package">
   because C# has true and works
3. I've imported this modified settings.

所以总结一下:

在导出的设置文档的Basic ToolsOptionsSubCategory中找到零件:<PropertyValue name="HideAdvancedMembers">false</PropertyValue>. 将其更改为<PropertyValue name="HideAdvancedMembers">true</PropertyValue>,保存,然后重新导入设置.

Find the part: <PropertyValue name="HideAdvancedMembers">false</PropertyValue> in the exported settings document's Basic ToolsOptionsSubCategory. Change this to <PropertyValue name="HideAdvancedMembers">true</PropertyValue>, save, and then reimport the settings.

我不知道为什么隐藏成员会导致显示更多成员,但无论如何;-)

I don't know why hiding members leads to showing more members, but whatever ;-)

这篇关于IntelliSense中的属性/方法列表不完整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆