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

查看:19
本文介绍了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 在 Visual Studio 社区页面.

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天全站免登陆