
On the menu bar, choose Architecture > Generate Code Map for Solution. To see all the dependencies in your solution: Similarly, you can create a new code map file without adding it to your solution by selecting Architecture > New Code Map or File > New > File. This template may not appear alphabetically, so scroll down to the bottom of the template list if you don't see it.Ī blank map appears in your solution's Solution Items folder. In the Add New Item dialog, under Installed, choose the General category.Ĭhoose the Directed Graph Document(.dgml) template and then select Add.

In Solution Explorer, open the shortcut menu for your top-level solution node. You can create an empty code map and drag items onto it, including assembly references, files and folders, or you can generate a code map for all or part of your solution.

However, in Visual Studio Community and Professional editions, you can open diagrams that were generated in Enterprise edition, but you cannot edit them.īefore you share maps created in Visual Studio Enterprise with others who use Visual Studio Professional, make sure that all the items on the map (such as hidden items, expanded groups, and cross-group links) are visible. To create and edit code maps, you need Visual Studio Enterprise edition. To create a code map in Visual Studio, first install the Code Map and Live Dependency Validation components However, you can drag and drop individual code elements or files from Solution Explorer, Class View, and Object Browser. For example, you cannot right-click an object in the text editor of a C++ project and add it to a code map. NET modules for Microsoft Dynamics AXįor projects other than C# or Visual Basic, there are fewer options for starting a code map or adding items to an existing code map. Native or managed C or C++ code in Visual C++ projects, header files (. Visual C# or Visual Basic in a solution or assemblies (. You can map dependencies for code in these languages:

With these maps, you can see the organization and relationships in your code, including its structure and its dependencies, how to update it, and estimate the cost of proposed changes. In Visual Studio, code maps help you more quickly see how your program code fits together without reading through files and lines of code. In this article, you'll learn how to visualize dependencies across your code with code maps.
