Share via

Registering Single File Generators

Applies to: yesVisual Studio noVisual Studio for Mac


This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

To make a custom tool available in Visual Studio, you must register it so Visual Studio can instantiate it and associates it with a particular project type.

To register a custom tool

  1. Register the custom tool DLL either in the Visual Studio local registry or in the system registry, under HKEY_CLASSES_ROOT.

    For example, here's the registration information for the managed MSDataSetGenerator custom tool, which comes with Visual Studio:

    @="COM+ class: Microsoft.VSDesigner.CodeGenerator.TypedDataSourceGenerator.DataSourceGeneratorWrapper"
    "Assembly"="Microsoft.VSDesigner, Version=, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a"
  2. Create a registry key in the desired Visual Studio hive under Generators\GUID where GUID is the GUID defined by the specific language's project system or service. The name of the key becomes the programmatic name of your custom tool. The custom tool key has the following values:

    • (Default)

      Optional. Provides a user-friendly description of the custom tool. This parameter is optional, but recommended.

    • CLSID

      Required. Specifies the identifier of the class library of the COM component that implements IVsSingleFileGenerator.

    • GeneratesDesignTimeSource

      Required. Indicates whether types from files produced by this custom tool are made available to visual designers. The value of this parameter needs to be (zero) 0 for types not available to visual designers or (one) 1 for types available to visual designers.


    You must register the custom tool separately for each language for which you want the custom tool to be available.

    For example, the MSDataSetGenerator registers itself once for each language:

    @="Microsoft VB Code Generator for XSD"
    @="Microsoft C# Code Generator for XSD"

See also