Microsoft Developer Network > Forums Home > Microsoft Visual Studio 2010 Beta 2 Forums > Visual Studio 2010 Domain-Specific Languages (DSL) & Modeling Tools Extensibility
Ask a questionAsk a question
 

Visual Studio 2010 Domain-Specific Languages (DSL) & Modeling Tools Extensibility

Discuss the Microsoft Domain-Specific Language (DSL) Tools and extending the architecture and modeling tools for Visual Studio 2010

Announcements

  • Creating a VSIX project to extend UML - workarounds

    Alan Cameron Wills -MSFTMonday, October 26, 2009 9:00 PM

    When you create a new VSIX project (for example to extend UML tools), you need to perform two workarounds to make the extension work. You should only need these in the Beta 2 release of Visual Studio 2010 Ultimate.

     

    1.       Error when adding a MEF Component to source.extension.vsixmanifest.

    Issue:

    For many types of extension, you need to define your project as a MEF component. You open the VSIX manifest, open the Add Content dialog, and set your project as the source. This procedure is described in How to Define and Install a Modeling Extension. But when try to do this, you see an error message: "Adding 'project' as a project-to-project reference would cause this project to reference itself."


    Workaround: Edit the manifest as XML

    In Solution Explorer, right-click source.extension.manifest and then click View Code.

    This opens the file in the XML editor.

    Inside the <Content>…</Content> node near the end of the file, insert:

      <MefComponent>|YourProjectName|</MefComponent>

                Notice the vertical bar characters at each side of your project name.

    2.       Installing your extension has no effect. The assembly is not included in the VSIX file.

    Issue:

    When you build and install the VSIX file, everything appears to go smoothly, except that the extension functionality does not appear in your models. If you open the VSIX file by changing its extension to .zip, the reason becomes apparent: there is no .dll in there.


    Workaround:

    In Solution Explorer, right-click the VSIX project file and click Unload Project.

    Then right-click again and click Edit YourProject.csproj.

    In the text editor, look for this line and change “false” to “true”:

    <IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>

    Save the file, then right-click Reload Project.

    Rebuild the project.

    3.       Custom toolbox items are not included in a VSIX file.

    Issue:

    When you build and install the VSIX file, the custom toolbox item does not appear in the target installation. If you open the VSIX file by changing its extension to .zip, it does not contain a .tbxinfo file.


    Fix:

    In Solution Explorer, right-click the .tbxinfo file and click Properties.

    In the Properties window, set Include in VSIX to true.

    Repeat this for the diagram files.


    These workarounds need only be applied once to each VSIX project.

RepliesViews