Search code examples
visual-studiointellisensevisual-studio-2017

Incomplete list of properties/methods in IntelliSense


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: enter image description here

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.

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?


Solution

  • 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.
    

    So to summarize:

    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 ;-)