Creating Extensions for Layer Diagrams

This Visual Studio 2010 feature pack lets you write code to create and update layer diagrams, and to validate the structure of your program code against layer diagrams in Visual Studio 2010 Ultimate. You can add commands that appear in the shortcut (context) menu of the diagrams, customize drag-and-drop gestures, and access the layer model from text templates. You can package these extensions into a Visual Studio Integration Extension (VSIX) and distribute them to users of Visual Studio Ultimate and Visual Studio Premium. For more information, see Visual Studio Feature Packs.

Important

You must install a Visual Studio 2010 Feature Pack to use this feature.

Layer diagrams are already available in Visual Studio 2010 Ultimate. For more information, see:

Requirements

Requirements for Authoring Layer Extensions

You must have installed the following on the computer where you want to develop your layer extensions:

  • Visual Studio 2010 Ultimate

  • Visual Studio 2010 SDK

  • Visual Studio 2010 Visualization and Modeling Feature Pack or Visual Studio 2010 Feature Pack 2. Both include the Visual Studio 2010 Visualization and Modeling Feature Pack Runtime.

    Important

    For the Visualization and Modeling Feature Pack only, you must install the feature pack in the Experimental instance of Visual Studio for debugging purposes. This is not required for Feature Pack 2.

To install the Feature Pack in the Experimental Instance of Visual Studio

  1. If you have not already done so, install the Visualization and Modeling Feature Pack on your computer.

  2. Close all instances of Visual Studio.

  3. On the Start menu, point to All Programs, Microsoft Visual Studio 2010 SDK, Tools, and then click Reset the Microsoft Visual Studio 2010 Experimental instance.

  4. Enable the feature pack and the runtime in the Experimental instance of Visual Studio.

    1. On the Start menu, point to All Programs, Microsoft Visual Studio 2010 SDK, Tools, and then click Start Experimental Instance of Microsoft Visual Studio 2010.

    2. In the new instance of Visual Studio, on the Tools menu, click Extensibility Manager.

    3. Make sure that both the feature pack and its runtime appear and are enabled. If you see [Disabled], click the item, and then click Enable.

    4. Close Visual Studio.

Requirements for Using Layer Extensions

You must have installed the following on the computer where you want to run your layer extensions:

  • Visual Studio 2010 Premium, Visual Studio 2010 Ultimate or Team Foundation Build

  • Visual Studio 2010 Visualization and Modeling Feature Pack Runtime

For more information, see Deploying a Layer Modeling Extension.

In This Section

Adding Commands and Gestures to Layer Diagrams

Adding Custom Architecture Validation to Layer Diagrams

Adding Custom Properties to a Layer Diagram

Navigating and Updating Layer Models in Program Code

Deploying a Layer Modeling Extension

Troubleshooting Extensions for Layer Diagrams

See Also

Concepts

How to: Define and Install a Modeling Extension

Layer Diagrams: Reference

Layer Diagrams: Guidelines

How to: Create Layer Diagrams from Artifacts

How to: Validate .NET Code Against Layer Diagrams

How to: Generate Files from a UML Model

How to: Open a UML Model by Using the Visual Studio API