Microsoft.VisualStudio.Package Namespace

This namespace now includes documentation only for the types in the Microsoft.VisualStudio.Package.LanguageService.* assemblies.



Encapsulates information about the source as obtained from a parsing operation.


AuthoringSink is used to gather information from the parser to help in the following:

  • error reporting
  • matching braces (ctrl-])
  • intellisense: Member Selection, CompleteWord, QuickInfo, MethodTips
  • management of the autos window in the debugger
  • breakpoint validation

CodeWindowManager provides a default implementation of the VSIP interface IVsCodeWindowManager and manages the LanguageService, Source, ViewFilter, and DocumentProperties objects associated with the given IVsCodeWindow. It calls CreateViewFilter on your LanguageService for each new IVsTextView created by Visual Studio and installs the resulting filter into the command chain. You do not have to override this method, since a default view filter will be created. If your LanguageService returns an object from CreateDocumentProperties then you will have properties in the Properties Window associated with your source files. The CodeWindowManager also provides support for optional drop down combos in the IVsDropdownBar for listing types and members by installing the TypeAndMemberDropdownBars object returned from your LanguageService CreateDropDownHelper method. The default return from CreateDropDownHelper is null, which results in no drop down combos.


Provides a default implementation of the VSIP interface IVsColorableItem.


This class implements the IVsColorizer interface and is used to support syntax highlighting in an editor.


Represents an IntelliSense completion list that is displayed in the current text view.


Wraps and applies multiple changes to a text view as a single operation.


This class can be used in a using statement to open and close a compound edit action via IVsCompoundAction interface. Be sure to call Close() at the end of your using statement, otherwise Dispose will call Abort.


Used to create CompoundAction objects.


Creates CompoundAction objects based on specific source files and views.


This class can be used in a using statement to open and close a compound edit action via IVsCompoundAction interface from an IVsTextView. This allows the view to optimize it's updates based on edits you are making on the buffer, so it's the preferred way of doing things if you have access to the IVsTextView. If not, use CompoundAction.


Manages a list of declarations to be shown in an IntelliSense drop-down list.


Associates a default value with a field name as defined in a code snippet template for a language service.


This class can be used as a base class for document properties which are displayed in the Properties Window when the document is active. Simply add some public properties and they will show up in the properties window.


Represents an item for a language service in the Error List Options window.


Represents a single entry in a combo box on a drop-down bar.


This class encapsulates a batch edit operation. The reason this class exists is because performing thousands of tiny edits on a large document can be pretty slow, so the best thing to do is merge the edits into bigger chunks and that is exactly what this class will do for you. The trick is that when merging edits you need to be careful not to include any IVsTextLineMarkers in the merged chunks, because editing over the top of the marker will blow it away, which is not what the user wants. The user wants to keep all their breakpoints and bookmarks, and red and blue squigglies and so on. So this class also takes care of that.


This class wraps a managed WinForm control and uses that as the editor window.


You must inherit from this class and simply add a [ComVisible] and [GuidAttribute] and then specify the EditorFactoryGuid, EditorFactoryGuid and EditorName variables in your Registration class. This base class provides a default editor factory implementation that hosts the Visual Studio Core editor.


Contains data about a specific editor.


This class encapsulates one atomic edit operation. Add these to an EditArray then when you are ready call ApplyEdits().


Provides support for expansion functions in code snippets for a language service.


Provides support for inserting code snippets into source code.


Static utilities for getting and setting file paths.


LanguagePreferences encapsulates the standard General and Tab settings for a language service and provides a way of getting and setting the values. It is expected that you will have one global LanguagePreferences created by your package. The General and Tabs settings are automatically persisted in .vssettings files by the core editor package. All you need to do is register your language under AutomationProperties/TextEditor and specify:

YourLanguage = s '%YourLocalizedName%'
   val Name = s 'YourLanguage'
   val Package = s '{F5E7E720-1401-11D1-883B-0000F87579D2}'
   val ProfileSave = d 1
   val ResourcePackage = s '%YourPackage%'

Therefore this class hides all it's properties from user setting persistence using DesignerSerializationVisibility.Hidden. This is so that if you give this object to the Package.ExportSettings method as the AutomationObject then it will only write out your new settings which is what you want, otherwise the General and Tab settings will appear in two places in the .vsssettings file.


This is the base class for a language service that supplies language features including syntax highlighting, brace matching, auto-completion, IntelliSense support, and code snippet expansion.


Provides support for the IntelliSense method tip operation.


Represents a collection of method signatures obtained from a parsing operation in a language service.


Provides information to execute a parsing operation in a language service.


This class View provides an abstract base class for simple editor views that follow the VS simple embedding model.


Source represents one source file and manages the parsing and intellisense on this file and keeping things like the drop down combos in sync with the source and so on.


A utility class that provides methods for manipulating and comparing instances of the TextSpan class, and also for validating positions.


This class provides a default implementation of IVsTextTipData for use in the IVsTextTipWindow for displaying tool tips.


Provides information about a particular token encountered by a language service's language parser.


Represents the two drop down bars on the top of a text editor window that allow types and type members to be selected by name.


ViewFilter provides a default implementation of IVsTextViewFilter providing a handling of the following VS commands:


Most of the work is delegated to the Source object.



Provides the characters that define comments for a language service.


Represents an object that can be interpreted as more than one type.



Scans individual source lines and provides coloring and trigger information about tokens.



Represents the different indenting styles supported by language services.


Provides reasons for a parsing operation in a language service.


Specifies the severity of a parser error in a language service.


Provides initial values for color indices as reported by an IScanner scanner.


TokenTriggers: If a character has (a) trigger(s) associated with it, it may fire one or both of the following triggers: MemberSelect - a member selection tip window MatchBraces - highlight matching braces or the following trigger: MethodTip - a method tip window

The following triggers exist for speed reasons: the (fast) lexer determines when a (slow) parse might be needed. The Trigger.MethodTip trigger is subdivided in 4 other triggers. It is the best to be as specific as possible; it is better to return Trigger.ParamStart than Trigger.Param (or Trigger.MethodTip)


Specifies the different types of tokens that can be identified and returned from a language service scanner.


Specifies the type of a variant object as used by a managed package framework (MPF) language service class.



Used to define a delegate for a parsing operation completion handler in a language service.


The Managed Package Framework source code that formerly was shipped as part of the Visual Studio SDK can now be found at MPF for Projects - Visual Studio 2010.