/vs-extensibility-skills:integrating-error-listfrom vs-extensibility-skills
Pushes custom errors, warnings, and messages into the Visual Studio Error List window. Covers VSIX Community Toolkit, VisualStudio.Extensibility, and legacy VSSDK approaches.
Ships in vs-extensibility-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Error List is one of Visual Studio's most prominent tool windows. Extensions can push custom errors, warnings, and messages into it so users can click through to the relevant source location.
The Error List is where developers expect to find build errors, analyzer warnings, and any problem that needs attention. Extensions that surface their own diagnostics here (rather than in a custom tool window or output pane) benefit from the user's existing workflow — filtering by severity, clicking to navigate, and seeing all problems in one place. The modern ITableDataSource API supports efficient snapshot-based updates, custom columns, and proper source filtering.
When to use the Error List vs. alternatives:
The toolkit wraps the complex ITableDataSource plumbing into two simple classes: TableDataSource and ErrorListItem.
NuGet package: Community.VisualStudio.Toolkit
Key namespace: Community.VisualStudio.Toolkit
Create one TableDataSource per extension. Give it a unique display name.
private static readonly TableDataSource _errorList = new("MyExtension");
var errors = new List<ErrorListItem>
{
new ErrorListItem
{
ProjectName = "MyProject",
FileName = @"C:/repos/MyProject/Program.cs",
Line = 10,
Column = 5,
Message = "Missing semicolon",
ErrorCode = "EXT001",
Severity = __VSERRORCATEGORY.EC_ERROR,
BuildTool = "MyExtension"
},
new ErrorListItem
{
ProjectName = "MyProject",
FileName = @"C:/repos/MyProject/Program.cs",
Line = 25,
Message = "Unused variable 'x'",
ErrorCode = "EXT002",
Severity = __VSERRORCATEGORY.EC_WARNING,
BuildTool = "MyExtension"
}
};
_errorList.AddErrors(errors);
| Value | Icon |
|---|---|
__VSERRORCATEGORY.EC_ERROR | Red error |
__VSERRORCATEGORY.EC_WARNING | Yellow warning |
__VSERRORCATEGORY.EC_MESSAGE | Blue message |
Setting Line and Column makes the entry clickable — double-clicking navigates to that location.
_errorList.CleanAllErrors();
[Command(PackageIds.ValidateCommand)]
internal sealed class ValidateCommand : BaseCommand<ValidateCommand>
{
private static readonly TableDataSource _errorList = new("MyExtension");
protected override async Task InitializeCompletedAsync()
{
VS.Events.DocumentEvents.Saved += OnDocumentSaved;
}
private void OnDocumentSaved(string filePath)
{
_errorList.CleanAllErrors();
IEnumerable<ErrorListItem> errors = ValidateFile(filePath);
_errorList.AddErrors(errors);
}
private static IEnumerable<ErrorListItem> ValidateFile(string filePath)
{
// Your validation logic here
yield break;
}
protected override Task ExecuteAsync(OleMenuCmdEventArgs e)
{
return Task.CompletedTask;
}
}
| Property | Type | Description |
|---|---|---|
ProjectName | string | Project name shown in the Error List |
FileName | string | Full path to the file (required for click navigation) |
Line | int | 0-based line number |
Column | int | 0-based column number |
Message | string | The error/warning message text |
ErrorCode | string | Short error code (e.g. "EXT001") |
ErrorCodeToolTip | string | Tooltip shown when hovering the error code |
ErrorCategory | string | Category string |
Severity | __VSERRORCATEGORY | Error, Warning, or Message |
HelpLink | string | URL for the help link |
BuildTool | string | Name of the tool that generated the error |
Icon | ImageMoniker | Custom icon moniker |
Do not use
ErrorListProvider/ErrorTask. These olderTaskProvider-based APIs predate the modern Error List table infrastructure (VS 2015+). They are deprecated in favor of theITableDataSource/ITableEntriesSnapshotpattern that the new Error List is built on. The toolkit'sTableDataSourcewraps this modern infrastructure; if you're not using the toolkit, implement the interfaces directly as shown below.
The modern VSSDK Error List is backed by the ITableManager infrastructure. There are no base classes — you must implement all the interfaces yourself.
NuGet package: Microsoft.VisualStudio.SDK
Key namespaces: Microsoft.VisualStudio.Shell.TableManager, Microsoft.VisualStudio.Shell.TableControl
You need to implement three interfaces:
ITableDataSource — registers with the Error List's ITableManager and creates snapshots.ITableDataSink — provided by VS; you call its methods to notify the Error List that data changed.ITableEntriesSnapshot — an immutable snapshot of your current error items; VS reads column values from it.using Microsoft.VisualStudio.Shell.TableManager;
internal class MyErrorDataSource : ITableDataSource
{
private readonly List<ITableDataSink> _sinks = new();
private MyErrorSnapshot _currentSnapshot = new(Array.Empty<MyError>());
// These identify your source in the Error List filter dropdown
public string SourceTypeIdentifier => StandardTableDataSources.ErrorTableDataSource;
public string Identifier => "MyExtension";
public string DisplayName => "My Extension";
public IDisposable Subscribe(ITableDataSink sink)
{
_sinks.Add(sink);
sink.AddSnapshot(_currentSnapshot);
return new DisposableAction(() => _sinks.Remove(sink));
}
public void UpdateErrors(IReadOnlyList<MyError> errors)
{
_currentSnapshot = new MyErrorSnapshot(errors);
foreach (var sink in _sinks)
{
sink.ReplaceSnapshot(_currentSnapshot, _currentSnapshot);
}
}
public void ClearErrors() => UpdateErrors(Array.Empty<MyError>());
}
internal class MyErrorSnapshot : ITableEntriesSnapshot
{
private readonly IReadOnlyList<MyError> _errors;
public MyErrorSnapshot(IReadOnlyList<MyError> errors) => _errors = errors;
public int Count => _errors.Count;
public int VersionNumber { get; } = 0;
public bool TryGetValue(int index, string keyName, out object content)
{
if (index < 0 || index >= _errors.Count)
{
content = null;
return false;
}
var error = _errors[index];
switch (keyName)
{
case StandardTableKeyNames.Text:
content = error.Message;
return true;
case StandardTableKeyNames.DocumentName:
content = error.FileName;
return true;
case StandardTableKeyNames.Line:
content = error.Line;
return true;
case StandardTableKeyNames.Column:
content = error.Column;
return true;
case StandardTableKeyNames.ErrorSeverity:
content = error.Severity;
return true;
case StandardTableKeyNames.ErrorCode:
content = error.ErrorCode;
return true;
case StandardTableKeyNames.BuildTool:
content = error.BuildTool;
return true;
case StandardTableKeyNames.ProjectName:
content = error.ProjectName;
return true;
default:
content = null;
return false;
}
}
// Required stubs
public void Dispose() { }
public void StartCaching() { }
public void StopCaching() { }
public int IndexOf(int currentIndex, ITableEntriesSnapshot newSnapshot) => currentIndex;
}
// During package initialization
ITableManagerProvider tableManagerProvider =
GetService(typeof(SComponentModel)) is IComponentModel componentModel
? componentModel.GetService<ITableManagerProvider>()
: null;
ITableManager errorTableManager =
tableManagerProvider.GetTableManager(StandardTables.ErrorsTable);
var dataSource = new MyErrorDataSource();
errorTableManager.AddSource(dataSource, StandardTableColumnDefinitions.ErrorSeverity,
StandardTableColumnDefinitions.ErrorCode, StandardTableColumnDefinitions.Text,
StandardTableColumnDefinitions.DocumentName, StandardTableColumnDefinitions.Line,
StandardTableColumnDefinitions.Column, StandardTableColumnDefinitions.ProjectName,
StandardTableColumnDefinitions.BuildTool);
Note: The
ITableDataSourceapproach is significantly more code than the toolkit'sTableDataSource. Use it when you need fine-grained control over snapshots, custom columns, or high-frequency updates where snapshot-based diffing is important. For most extensions, prefer the toolkit wrapper.
The VisualStudio.Extensibility SDK does not currently provide a direct API for writing to the Error List. Error List integration is an in-process feature that relies on ITableDataSource or ErrorListProvider, both of which require in-process access to the VS shell.
If you need Error List support from an out-of-process extension, your options are:
Use the Output Window instead — write diagnostics to a custom output channel:
OutputChannel? channel = await this.Extensibility.Views().Output
.CreateOutputChannelAsync("My Extension", cancellationToken);
await channel.Writer.WriteLineAsync("Error: Missing semicolon at line 10");
Use a mixed in-proc/out-of-proc extension — keep your main logic out-of-process but add an in-process companion component that hosts the ErrorListProvider or TableDataSource. See the VisualStudio.Extensibility documentation on in-proc extensions.
Do NOT use
ErrorListProvider/ErrorTaskfor new extensions. These classes are deprecated and predate the modern Error List table infrastructure introduced in VS 2015. They still compile, and many old tutorials and blog posts show them, but they lack support for custom columns, efficient snapshot-based updates, and proper lifecycle management. UseTableDataSource(Toolkit) orITableDataSource/ITableEntriesSnapshot(VSSDK) instead.
Do NOT follow old walkthroughs that show
TaskProvider.Tasks.Add(new ErrorTask(...))— this is the deprecatedErrorListProviderpattern. Search forITableDataSourceexamples instead.
Do NOT attempt to write to the Error List from a pure out-of-process VisualStudio.Extensibility extension. The Error List is an in-process feature. If you need Error List integration from an out-of-process extension, use the Output Window as an alternative, or create an in-process hybrid component that hosts the
TableDataSource.
Do NOT create a new
TableDataSourcefor every error batch. Create a singleTableDataSourceinstance in your extension, and update it by publishing newITableEntriesSnapshotinstances. Creating multiple sources clutters the Error List's source filter dropdown.
AddErrors (Toolkit) or ITableDataSink.AddSnapshot (VSSDK) with a non-empty collection. Also verify the Error List filter isn't hiding your entries (check the source filter dropdown).CleanAllErrors (Toolkit) or publish an empty snapshot (VSSDK) when your source has no more diagnostics.FileName, Line, and Column on ErrorListItem. For VSSDK, populate the DocumentName, Line, and Column snapshot columns.TableDataSource display name (Toolkit) or ITableDataSource.DisplayName (VSSDK). Set it to your extension's name.ErrorListProvider pattern doesn't work in newer VS: ErrorListProvider / ErrorTask are deprecated. Migrate to TableDataSource (Toolkit) or ITableDataSource (VSSDK).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (madskristensen/vs-agent-plugins) — no native marketplace selected
npx claudepluginhub p/madskristensen-vs-extensibility-skills41 skills in this plugin
/adding-codelens-indicatorsAdd custom CodeLens indicators that display inline information above code elements in the Visual Studio editor. Use when the user asks how to add a CodeLens indicator, show inline data above methods or classes, create a custom CodeLens provider, implement IAsyncCodeLensDataPointProvider, display git history or test status in CodeLens, or add a details popup to CodeLens entries. Covers VSSDK / VSIX Community Toolkit (in-process + out-of-process CodeLens service). VisualStudio.Extensibility (out-of-process) does not have a dedicated CodeLens API./adding-commandsAdd commands (menu items, toolbar buttons) to Visual Studio extensions. Use when the user asks how to create a command, add a menu item, add a toolbar button, register a command handler, wire up a .vsct file, use KnownMonikers icons on buttons, or place commands in menus/toolbars in a Visual Studio IDE extension. Covers VisualStudio.Extensibility (out-of-process), VSIX Community Toolkit (in-process), and legacy VSSDK (in-process) approaches./adding-context-menusAdd native-looking context menus to custom WPF UI in Visual Studio extensions (tool windows, custom tree views, list views). Use when the user wants to show a right-click context menu from their own UI that looks native to VS. Covers defining VSCT context menus (type="Context"), grouping commands with separators, and programmatically showing them via IVsUIShell.ShowContextMenu. Do NOT use regular WPF ContextMenu — it won't match VS theming or support command routing. Covers VSSDK and VSIX Community Toolkit (in-process). VisualStudio.Extensibility (out-of-process) does not support VSCT-based context menus on custom UI.Other plugins' skills for the same job