Export (0) Print
Expand All

Troubleshooting Extensions for Layer Diagrams

This topic addresses some problems that you might encounter when you create layer model extensions in Visual Studio 2010 Ultimate by using the Visual Studio 2010 Visualization and Modeling Feature Pack. For more information, see Visual Studio Feature Packs.

Important noteImportant

To author extensions for layer diagrams when using the Visualization and Modeling Feature Pack, you must install and enable the feature pack and its runtime in the Experimental instance of Visual Studio. You do not have to perform this step with Visual Studio 2010 Feature Pack 2. For more information, see Requirements in Creating Extensions for Layer Diagrams.


When I press F5 to debug my extension, my commands, gesture handlers, validation extensions, or custom properties do not appear on layer diagrams in the Experimental instance of Visual Studio

  1. Make sure that the Visualization and Modeling Feature Pack and its runtime are installed and enabled in the Experimental instance of Visual Studio.

    1. Close Visual Studio.

    2. 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.

    3. On the Tools menu, open Extension Manager.

    4. Make sure that both the feature pack and its runtime appear, and that they are not marked as [Disabled].

      • If feature pack or its runtime is marked as [Disabled], click the item, and then click Enable.

      • If the feature pack and runtime do not appear, close all instances of Visual Studio. 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.

  2. Open your extension solution in the Experimental instance of Visual Studio, and on the Build menu, click Rebuild Solution.

  3. Press F5 or CTRL+F5 to start the experimental instance of Visual Studio. Open a layer diagram and test your extension.

Continue with the next procedure if necessary.

An old version of my extension runs.

  1. Make sure that no experimental instance of Visual Studio is running.

  2. Delete the following folder: %LocalAppData%\Microsoft\VisualStudio\10.0Exp\ComponentModelCache

    NoteNote

    %LocalAppData% is typically DriveName:\Users\UserName\AppData\Local. On Windows XP or Windows 2003, use %AppData% instead of %LocalAppData%.

Continue with the next procedure if necessary.

An old version of my validation results appears, or my validation method is not called.

  1. In the experimental instance of Visual Studio, on the Build menu, click Clean Solution. This clears the cached results of the previous validation analysis.

  2. Make sure that the layers in your model are associated with code elements, and that there is at least one dependency link in the model. Validation is not invoked if there is nothing to validate.

  3. Regular breakpoints might not work in a validation method, because it runs in a separate process. You must insert a call to System.Diagnostics.Debugger.Launch() if you want to step through your method.

  4. In source.extension.vsixmanifest in your layer validation project, make sure that you have added both a MEF Component item and a Custom Extension Type item under Content.

Community Additions

ADD
Show:
© 2014 Microsoft