adding-solution-explorer-nodes

Add custom Solution Explorer nodes via MEF-based IAttachedCollectionSourceProvider.

14|2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/madskristensen/vs-agent-plugins --skill adding-solution-explorer-nodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-solution-explorer-nodes
Source: https://github.com/madskristensen/vs-agent-plugins/tree/main/skills/adding-solution-explorer-nodes
Command: npx skills add https://github.com/madskristensen/vs-agent-plugins --skill adding-solution-explorer-nodes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Custom nodes allow Visual Studio extensions to surface virtual items directly in Solution Explorer, by wiring an IAttachedCollectionSourceProvider through MEF, enabling dynamic content under the solution or project trees.

Core Features & Use Cases

  • Expose virtual nodes under Solution Explorer using a MEF-based source provider
  • Define root and child node types that implement IAttachedCollectionSource and ITreeDisplayItem
  • Support search with ContainedBy and proper parent-child relationships for richer navigation

Quick Start

Create an IAttachedCollectionSourceProvider export, implement a root node with child items, and register the provider to expose additional items under the Solution Explorer.

Frequently Asked Questions about adding-solution-explorer-nodes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add custom nodes to the Visual Studio Solution Explorer?

You add custom nodes by exporting an IAttachedCollectionSourceProvider through MEF, which allows your Visual Studio extension to attach virtual items dynamically under solution or project trees.

What is IAttachedCollectionSourceProvider used for in Visual Studio extensions?

IAttachedCollectionSourceProvider is a MEF export contract used to inject virtual collections into the Visual Studio solution tree, enabling extensions to display custom child nodes under solution or project items.

How do I display virtual items under project nodes in Solution Explorer?

You display virtual items by implementing IAttachedCollectionSource and ITreeDisplayItem, wiring them through an IAttachedCollectionSourceProvider to define root and child node relationships under project nodes.

Do I need the VSSDK to create custom Solution Explorer tree nodes?

Yes, creating custom Solution Explorer tree nodes requires in-process APIs from the VSSDK or Visual Studio Toolkit to implement MEF-based attached collection source providers within your extension.

Can I support search navigation for custom Solution Explorer nodes?

Yes, you support search navigation by implementing ContainedBy relationships and proper parent-child hierarchies, which enables richer search navigation for custom virtual nodes within Solution Explorer.

What are the limitations of using MEF attached collections for Solution Explorer extensions?

MEF attached collections require in-process API access via VSSDK or Visual Studio Toolkit, restricting this approach to extensions running inside the Visual Studio process rather than external or out-of-proc tooling.