Search code examples
visual-studio-2015visual-studio-2017code-map

Visual studio 2017 code maps filtering


Is there way to filter only method calls on code map when you select a method and click "Show Methods this calls"? When I only check "Methods" in code map filter, it also shows getters and setters along with method name. I understand technically they are methods(get and set) but the diagram gets super cluttered with these getters & setters. How do we get rid of them and only show true C# Methods?

enter image description here

enter image description here


Solution

  • I figured out eventually. In order for this solution to work you must select select "Skip Build" option.

    1. Bring the method over to code map.
    2. From the context menu, chose "Show Methods this calls".
    3. By default, if you filters are on, everything that this method calls (constructor, getters, setters, fields, properties etc) will be displayed.
    4. Uncheck everything from filters and select only Property.
    5. This will display all the the properties.
    6. Select all properties and delete them. This will also delete getter and setters in those methods.
    7. Now uncheck property and check Method from filter.

    You will see only methods :) Much better.