ProvideLanguageServiceAttribute.MaxErrorMessages Property

Determines the maximum number of errors message that a language service can report for a parsing operation.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)


Public Property MaxErrorMessages As Integer
public int MaxErrorMessages { get; set; }
property int MaxErrorMessages {
    int get ();
    void set (int value);
member MaxErrorMessages : int with get, set
function get MaxErrorMessages () : int
function set MaxErrorMessages (value : int)

Property Value

Type: System.Int32
Returns a number indicating the maximum number of errors that can be reported.


A language service can report warnings and errors that may result from a parsing operation. These warnings and errors are displayed in the Error List task window. The MaxErrorMessages property specifies the maximum number of errors that can be displayed at a time in the Error List window by the language service. Keeping this value fairly small reduces the amount of clutter that can appear, especially if parsing occurs while the user is typing and they have not finished typing a particular language construct.

This property is specific to the managed package framework (MPF).

The default is 10 when the corresponding registry entry is accessed through the LanguagePreferences class.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\
  [Language Name]\
    MaxErrorMessages = reg_dword: 0x0000000f


    [ProvideLanguageService(typeof(MyLanguageService),           // Required
                            MyConstants.languageName,            // Required
                            MyConstants.languageNameResourceID,  // Required
        // Optional language service properties
        MaxErrorMessages = 15,  // Max messages to report

.NET Framework Security

See Also


ProvideLanguageServiceAttribute Class

Microsoft.VisualStudio.Shell Namespace