Registering a Legacy Language Service

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Registering a Legacy Language Service2.

The following sections provide lists of registry entries for the various language service options available in Visual Studio.

In the following list of registry entries, VS Reg Root is equal to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\X.Y, where X.Y is the Visual Studio version number.

The VS Reg Root\Languages\Language Services\Language Name key can contain the following values.

NameTypeRangeDescription
(Default)REG_SZ<GUID>GUID of the language service.
LangResIDREG_DWORD0x0-0xffffString resource identifier (ResID) for the localized text name of the language.
PackageREG_SZ<GUID>GUID of the VSPackage.
ShowCompletionREG_DWORD0-1Specifies whether the Statement completion options in the Options dialog box are enabled.
ShowSmartIndentREG_DWORD0-1Specifies whether the option to select Smart indenting in the Options dialog box is enabled.
RequestStockColorsREG_DWORD0-1Specifies whether custom or default colors are used to color keywords.
ShowHotURLsREG_DWORD0-1Specifies whether the user can click URLs.
Default to Non Hot URLsREG_DWORD0-1Specifies the initial setting for the Enable single-click URL navigation option in the Options dialog box.
DefaultToInsertSpacesREG_DWORD0-1Specifies whether the language service has "insert spaces" as its default tab option.
ShowDropdownBarOptionREG_DWORD0-1Enables or disables the Navigation bar option in the Options dialog box that shows or hides the Navigation bar.
Single Code Window OnlyREG_DWORD0-1Enables or disables the New Window choice in the Window menu for a language service.
EnableAdvancedMembersOptionREG_DWORD0-1Enables or disables an Options dialog box setting for Hide Advanced Members.
Support CF_HTMLREG_DWORD0-1Specifies whether the editor enables copying and pasting of HTML data.
EnableLineNumbersOptionREG_DWORD0-1Specifies whether the Line numbers options in the Options dialog box is enabled for a language service.
HideAdvancedMembersByDefaultREG_DWORD0-1Specifies whether advanced members such as private fields are hidden in completion lists.
ShowBraceCompletionREG_DWORD0-1Specifies whether the Brace completion option in the Options dialog box is enabled.

Example

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\  
  Languages\  
    Language Services\  
      C/C++\  
        (Default)             = reg_sz:{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}  
        LangResID             = reg_dword:0x00000000  
        Package               = reg_sz:{8C2EA640-ABC1-11D0-9D62-00C04FD9DFD9}  
        ShowCompletion        = reg_dword:0x00000001  
        ShowSmartIndent       = reg_dword:0x00000001  
        ShowDropdownBarOption = reg_dword:0x00000001  

The VS Reg Root\Languages\Language Services\Language Name\Debugger Languages\GUID\ key can include the following values.

NameTypeRangeDescription
(Default)REG_SZtextThe default value can be used to document the name of the language. The name of this key is a GUID of an expression evaluator that has a corresponding entry in <VS Reg Root>\AD7Metrics\Expression Evaluator.

Example

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\  
  Languages\  
    Language Services\  
      C/C++\  
        Debugger Languages\  
          {3A12D0B7-C26C-11D0-B442-00A0244A1DD2}\  
            (Default) = reg_sz:C++  

You can add registry keys under the EditorToolsOptions key for property pages and property nodes. These keys and their values identify property pages in the Options dialog box (on the Tools menu) that are used to configure the language service. In the following example, Page Name is the name of a property page, and Node Name is the name of a node in the tree on the Options dialog box. The page entry and the node entry must be specified separately.

NameTypeRangeDescription
(Default)REG_SZResIDThe localized display name of this option page. The name can be literal text, or #nnn, where nnn is a string resource ID in the satellite DLL of the specified VSPackage.
PackageREG_SZGUIDThe GUID of the VSPackage that implements this options page.
PageREG_SZGUIDThe GUID of the property page to request from the VSPackage by calling the GetPropertyPage method. If this registry entry is not present, the registry key describes a node, not a page.

Example

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\  
  Languages\  
    Language Services\  
      CSharp\  
        EditorToolsOptions\  
          Formatting\  
            (Default) = reg_sz:#242  
            Package   = reg_sz:{A066E284-DCAB-11D2-B551-00C04F68D4DB}  
            General\  
              (Default) = reg_sz:#255  
              Package   = reg_sz:{A066E284-DCAB-11D2-B551-00C04F68D4DB}  
              Page      = reg_sz:{3EB2CC0B-033E-4D75-B26A-B2362C25227E}  
            Indentation\  
              (Default) = reg_sz:#250  
              Package   = reg_sz:{A066E284-DCAB-11D2-B551-00C04F68D4DB}  
              Page      = reg_sz:{5E21D017-6D2A-4114-A1F1-C923F001CBBB}  
            Newlines\  
              (Default) = reg_sz:#253  
              Package   = reg_sz:{A066E284-DCAB-11D2-B551-00C04F68D4DB}  
              Page      = reg_sz:{607D8062-68D1-41E4-9A35-B5E7F14D0481}  

The entry for the file extension should include the leading period, for example ".myext".

NameTypeRangeDescription
(Default)REG_SZGUIDService GUID for the default language service for this file name extension type.

Example

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\  
  Languages\  
    File Extensions\  
      .cpp\  
        (Default) = {B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}  

The VS Reg Root\Editors key can contain the following values:

NameTypeRangeDescription
(Default)REG_SZ""Unused; you can put your name here for documentation.
DefaultToolboxTabREG_SZ""Name of the toolbox tab to make default when the editor is active.
DisplayNameREG_SZResIDName to display in the Open With dialog box. The name is the string resource ID or a name in standard format.
ExcludeDefTextEditorREG_DWORD0-1Used for the Open With menu command. If you do not want to list the default text editor in the list of available editors for a specific file type, set this value to 1.
LinkedEditorGUIDREG_SZ<GUID>Used for any language service that can open a file with codepage support. For example, when you open a .txt file by using the Open With command, options are provided for using the source code editor with and without encoding.

The GUID specified in the name of the subkey is for the codepage editor factory; the linked GUID specified in this specific registry entry is for the regular editor factory. The purpose of this entry is that if the IDE does not open a file by using the default editor, the IDE will try to use the next editor in the list. This next editor should not be the codepage editor factory because this editor factory is basically the same as the editor factory that failed.
PackageREG_SZ<GUID>VSPackage GUID for the display name's ResID.

Example

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\  
  \Editors\  
    {8281C572-2171-45AA-A642-7D8BC1662F1C}\  
      (Default)            = reg_sz:Html Editor with Encoding  
      DefaultToolboxTab    = reg_sz:HTML  
      DisplayName          = reg_sz:#20101  
      LinkedEditorGUID     = reg_sz:{C76D83F8-A489-11D0-8195-00A0C91BBEE3}  
      Package              = reg_sz:{1B437D20-F8FE-11D2-A6AE-00104BCC7269}  

The VS Reg Root\Editors\Editor GUI>\LogicalViews key can contain the following values.

NameTypeRangeDescription
(Default)REG_SZUnused.
<GUID>REG_SZ""Key to the logical views supported. You can have as many of these as you need. The name of the registry entry is what is important, not the value, which is always an empty string.

Example

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\  
  \Editors\  
    {8281C572-2171-45AA-A642-7D8BC1662F1C}\  
      LogicalViews\  
       (Default) = reg_sz:  
       {7651a700-06e5-11d1-8ebd-00a0c90f26ea} = reg_sz:  
       {7651a701-06e5-11d1-8ebd-00a0c90f26ea} = reg_sz:  
       {7651a702-06e5-11d1-8ebd-00a0c90f26ea} = reg_sz:  
       {7651a703-06e5-11d1-8ebd-00a0c90f26ea} = reg_sz:  

The VS Reg Root\Editors\Editor GUID\Extensions key can contain the following values. The file name extension does not include the leading period.

NameTypeRangeDescription
(Default)REG_SZUnused.
<ext>REG_DWORD0-0xffffffffRelative priority of extensions. If two or more languages share the same extension, the higher-priority language is chosen.

Additionally, the current user's default selection for an editor is stored in HKEY_Current_User\Software\Microsoft\VisualStudio\X.Y\Default Editors\ext. The GUID of the selected language service is in the Custom entry. This takes precedence for the current user.

Example

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\  
  \Editors\  
    {8281C572-2171-45AA-A642-7D8BC1662F1C}\  
      Extensions\  
       (Default) = reg_sz:  
       *         = reg_dword:0x00000018  
       html      = reg_dword:0x00000027  
       shtm      = reg_dword:0x00000027  
       shtml     = reg_dword:0x00000027  

The following registry entries are specific to the managed package framework (MPF) language service classes. These registry entries indicate support in the language service for various IntelliSense features and for other advanced editing features.

These registry entries are accessed through the LanguagePreferences class.

NameTypeRangeDescription
CodeSenseREG_DWORD0-1Support for IntelliSense operations.
MatchBracesREG_DWORD0-1Support for matching language pairs such as braces, parentheses, and brackets.
QuickInfoREG_DWORD0-1Support for the IntelliSense Quick Info operation.
ShowMatchingBraceREG_DWORD0-1Support for displaying the matching language pair in the status bar.
MatchBracesAtCaretREG_DWORD0-1Support for displaying matching language pairs, typically through highlighting the two elements.
MaxErrorMessagesREG_DWORD0-nThe maximum number of errors that can be displayed in the Error List window.
CodeSenseDelayREG_DWORD0-nThe number of milliseconds to delay before initiating any background parsing for an IntelliSense operation.
EnableAsyncCompletionREG_DWORD0-1Support for background parsing.
EnableCommentingREG_DWORD0-1Support for commenting out selected blocks of text, and also implies support for uncommenting selected text.
EnableFormatSelectionREG_DWORD0-1Support for formatting text such as auto-indentation or adjusting the position of braces.
AutoOutliningREG_DWORD0-1Support for outlining (regions that can be collapsed).
MaxRegionsREG_DWORD0-nThe maximum number of hidden regions per file.
ExampleHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\  
  Languages\  
    Language Services\  
      XML\  
        (Default)             = reg_sz:{f6819a78-a205-47b5-be1c-675b3c7f0b8e}  
        MatchBraces           = reg_dword:0x00000001  
        QuickInfo             = reg_dword:0x00000001  
        ShowMatchingBrace     = reg_dword:0x00000001  
        MatchBracesAtCaret    = reg_dword:0x00000000  
        MaxErrorMessages      = reg_dword:0x00000064  
        CodeSenseDelay        = reg_dword:0x000001f4  
        MaxRegions            = reg_dword:0x0000000a  

Developing a Legacy Language Service

Show: