Find Code with Architecture Explorer
In Visual Studio Ultimate, you can use Architecture Explorer to help you explore and find source code in Visual C# .NET, Visual Basic .NET, and Visual C++ projects, and compiled code such as assembly files, executable files, and binary files. You can also create dependency graphs from Architecture Explorer. See Visualize Code Dependencies on Dependency Graphs.
In This Topic
Introducing Architecture Explorer
Find source code in a Visual Studio solution.
Find compiled code in managed assembly or executable files.
Refine your browsing results.
Refresh your browsing results.
Introducing Architecture Explorer
To open Architecture Explorer
On the Architecture menu, point to Windows, and then click Architecture Explorer.
To resize Architecture Explorer, drag the top of the window to the height that you want. To move ArchitectureExplorer, drag its title bar, or tab, to the position that you want.
Tip
If any windows appear above Architecture Explorer, such as the Error List window or the Output window, move those windows so that they do not prevent you from resizing Architecture Explorer.
Architecture Explorer: Domains, views, nodes, node types, and link types
Architecture Explorer represents structures as nodes and relationships as links. As you browse, Architecture Explorer displays nodes in successive columns. The first column shows the domains and views that you can browse. When you select a domain and a view, Architecture Explorer shows you the available nodes in that view.
When you select nodes in a column, the next column in Architecture Explorer shows you nodes that are logically related to your current selection. For example, if you select namespaces, you will see types in the next column. If you select types, you will see members in the next column. The collapsed action column that appears along the right side of a node column identifies the default types or relationships of the nodes that the next column contains. You can filter the results of the next column by expanding the action column and selecting specific types of nodes or links.
Tip
The action column is highlighted when you move the pointer over it.
Find Source Code in a Visual Studio Solution
You can use Class View or Solution View in Architecture Explorer to browse source code down to the level of expressions.
Class View shows you a logical view of a Visual Studio solution. For example, you can browse by namespace, classes, members, and so on.
Solution View shows you physical view of a Visual Studio solution. For example, you can browse by project, project files, and so on.
To find code in your solution
In the first column of Architecture Explorer, under Visual Studio <solution name>, click Class View or Solution View.
A node column appears to the right of the first column. This column shows all the nodes that are available in the selected view. For example, if you selected Class View, you see all the namespaces that logically exist in your solution.
In the node column, select a node or multiple nodes to see the next column of related nodes. To select all the nodes in the current column, press CTRL+A.
Repeat step 2 until you find the nodes that you want.
Tip
To restart your query by clearing the columns, on the Architecture Explorer tool bar, click Clear Columns.
Find Compiled Code in Assembly, Executable, or Binary Files
Use Select Files in Architecture Explorer to browse managed assemblies down to the level of method-to-method calls.
On the Architecture menu, point to Windows, and then click Architecture Explorer.
In the first column, under File System, click Select Files.
In the Open dialog box, browse to the assemblies or binaries, select them, and then click Open.
A node column appears and shows the selected files.
In the node column, select a file or multiple files.
Another node column appears and shows all the nodes in the selected files.
Select a node or multiple nodes to see the next column of related nodes. To select all the nodes in the current column, press CTRL+A.
Repeat step 4 and step 5 until you find the nodes that you want.
Refine Your Browsing Results
You can refine the results of your browsing session in the following ways:
Filter nodes in the current column by name.
Filter nodes in the current column by node type or property.
Filter nodes in the next column by node type.
Filter nodes in the next column by link type.
Group nodes by container or property value
Filter Nodes in the Current Column By Name
In Architecture Explorer, at the top of the node column, click the shaded area to show the filter box.
Type the name, and then press ENTER.
The current column shows only the matching nodes. The lower-right corner of the column displays a watermark to show that the column is filtered.
Filter Nodes in the Current Column By Node Type or Property
In Architecture Explorer, at the top of the node column, click the shaded area to show the filter box.
To the left of the filter box, click the Filter items in the current column by category or property button.
To show only those nodes of a specific type, under Categories, click the types that you want.
To show only those nodes with specific properties, under Properties, click the properties that you want.
When you are finished, click OK.
The current column shows only the matching nodes. The lower-right corner of the column displays a watermark to show that the column is filtered.
Filter Nodes in the Next Column By Node Type
In Architecture Explorer, browse to the node column that comes before the nodes that you want to see, and then select the nodes that you want.
On the right side of the node column, click the collapsed action column to expand it.
Tip
The action column is highlighted when you move the pointer over it.
In the action column, under Node Navigation, select the specific types of nodes that you want to see next. To see a union of these types, select multiple types.
A node column appears and shows any matching nodes.
Note
When you browse .NET code, you might see the following types that apply only to C and C++ code and will not show results if you select them: Unions, Typedefs, and Members.
Filter Nodes in the Next Column By Link Type
Architecture Explorer organizes the link types that are used to filter the next set of nodes into two categories: inbound or outbound. These categories describe the direction of the link relative to the currently selected node. An outbound link points from the currently selected node to the next related node. An inbound link points from the previous related node to the currently selected node. When you select an outbound link type, Architecture Explorer shows you the next level of related nodes. When you select an inbound link type, Architecture Explorer shows you the previous level of related nodes.
For example, if you select a class node, and you select the outbound Contains link type, Architecture Explorer shows you the nodes that the class node contains. If you select the inbound Contained By link type for that class node, you see nodes that contain that class, such as namespaces, class files, and projects.
In Architecture Explorer, browse to the node column that comes before the nodes that you want to see, and then select the nodes that you want.
On the right side of the node column, click the collapsed action column to expand it.
Note
The action column appears highlighted when you move the pointer over it.
In the action column, select one of the following:
To see related nodes at the next level, under Outbound Navigation, select the link types that you want.
To see related nodes at the previous level, under Inbound Navigation, select the link types that you want.
Note
To see a union of these types, select multiple types.
The next column appears and shows any matching nodes.
Group Nodes by Container or Property Value
In Architecture Explorer, you can create groups of nodes based on either their existing containment relationships or their property values. If grouping is possible, a list of new group nodes will appear when you complete this task.
When you create a graph from these groups in Architecture Explorer, you can use the Show All as Groups command to organize linked nodes into groups. For more information, see the following topics:
You can also use groups to organize nodes on an existing graph. For more information, see Edit and Customize Dependency Graphs.
In Architecture Explorer, browse to the node column that contains the nodes that you want to group. To select all the items in the column, press CTRL+A.
On the right side of the node column, click the collapsed action column to expand it.
Note
The action column appears highlighted when you move the pointer over it.
In the action column, under Grouping:
Click
Then
Group by Containers to see any available groups
To see nodes that are in these groups, select some groups.
The next column shows the nodes that are in the selected groups.
Group by Properties to see any available properties
Select the properties that you want to use as groups.
The next column shows groups organized by property value.
To see nodes that have specific property values, select some property value groups.
The number and kinds of groups that you see are based on the types of the property values:
Boolean values: True and False
Integer values: Four groups that divide the range of values into even quartiles.
String values: A group appears for each unique string value, and nodes belong to each group based on their particular property value.
This is most useful when the selected property has the same string value across multiple nodes. For example, if you select a property has a unique string value for each node, then you will get one group per node.
Refresh Your Browsing Results
You must refresh Architecture Explorer manually to show any changes that are made to the code or solution.
To refresh Architecture Explorer
In Architecture Explorer, browse to the node column that comes before the column that you want to refresh.
In the current column, select the nodes that are related to the updated nodes.
Another node column appears to shows the refreshed list of nodes.