Exercise 2: Working with Graph Nodes and Grouping

In this exercise, you will learn how to reduce dependency graph complexity by removing unwanted nodes, adjusting the grouping of nodes, and modifying graph node properties.

  1. Return to the original collapsed view of the dependency graph by right-clicking and selecting Group | Collapse All.
  2. Zoom to fit the dependency graph to the visible screen (Zoom drop down).
  3. Expand the Externals node from the dependency graph to expose the external assemblies used by the Tailspin application.
  4. Select both of the mscorlib.dll assembly nodes and press the Delete key to remove them from the graph. The rationale behind removing this node, as well as many other commonly used external assemblies and types, might be that it adds too much noise to the graph and makes it difficult to navigate efficiently.

    Figure 1

    Location of mscorlib.dll

    Note:
    Multiple nodes labeled mscorlib.dll exist because the application references two different versions of the assembly.
  5. Delete both System.dll nodes from the Externals group as well.
    Note:
    The gray relationship lines connected to the Externals group stop at the boundary of the group. The purpose of this is to reduce the visual complexity of the dependency graph. If you remove the Externals grouping, you will be able to see all the direct relationship lines between external and internal assemblies as well as more detail between assemblies currently grouped within Externals.
  6. Select the Externals group, right-click and select Group | Remove Group. This will remove the grouping but not the graph nodes contained within.

    Figure 2

    Removing the Externals group

  7. Zoom to fit the dependency graph to the visible screen (Zoom drop down).
  8. Delete the Tailspin.Test.Model.dll node from the graph. We should remove this node to get a better idea of how the deployed application works.

    Figure 3

    Simplified assembly dependency graph

  9. Although the removal of the Externals group gives us a better idea of what is going on, it makes it difficult to distinguish between the application assemblies and those that were previously grouped as Externals. This can be fixed by adding a node property to give external assemblies a different color. Click the Add drop down from the Legend panel shown in the top-right corner of the graph and select Node Property | IsExternal.

    Figure 4

    Creating a node property that targets IsExternal

  10. The IsExternal node property is added to the Legend panel. Locate the IsExternal drop down and select the Background… option to load the Color Set Picker window.

    Figure 5

    Changing the Background color for nodes depending upon the IsExternal state

  11. In the Color Set Picker window, select the True drop down and pick the color red (or another color other than blue).
  12. Select the OK button to confirm the selection.

    Figure 6

    Dependency graph showing external assembly nodes in red

To give feedback please write to VSKitFdbk@Microsoft.com

Copyright © 2010 by Microsoft Corporation. All rights reserved.