Home

Awesome

Visual Studio Project System Extensibility Documentation

What is a project system?

A project system sits between a project file on disk (for example, .csproj and .vbproj) and various Visual Studio features including, but not limited to, Solution Explorer, designers, the debugger, language services, build and deployment. Almost all interaction that occurs with files contained in a project file, happens through the project system.

There are three reasons to extend a project system in Visual Studio:

  1. Support a new project file format.
  2. Integrate existing file format with a new language service.
  3. Customize behavior of an existing project system.

Project system extensibility

The traditional way to a build or customize a project system is to implement a set of Project System COM interfaces. Most project systems don't start from scratch. Instead, they leverage the MPFProj project system example as a starting point.

The Visual Studio Project System (VSPS) described in this repository provides default implementation for a subset of project system COM interfaces. This simplifies building and maintaining a project system, but comes with the cost of reduced functionality.

How to select a project system platform?

ScenarioRecommended Project System Platform
Customize C#/VB/F# Desktop project systemCOM-based project flavoring.
Customize C#/VB/F# .NET Core project systemNot fully supported at this time. VSPS is your best bet.
Add new a project type or a languagePrototype with VSPS, but be ready to fall back to MPFProj for complex scenarios that VSPS doesn't support yet.

Compare MPFProj and Visual Studio Project System

CriteriaMPFProjVisual Studio Project System (this repo)
MaturityReleasePreview
Breaking changes in major updatesNone[Expected][changes]
FlexibilityFull control over project system behavior.Some project system interfaces are not implemented.
ComplexityHigh: You will need to understand all project interfaces.Low: You only need to understand customized behavior.
ExtensibilityImplements project system COM interfaces.C# with managed interfaces for extension points and MEF.
Threading modelSingle threaded and bound to the UI thread.Multi-threaded, scalable, and responsive.
ScalabilityMemory-optimizedUses extra memory to support multi-threading.
MethodologyProvides templates that implement project interfaces. The project system can modify or add to these templates.Locks down project system interfaces and allows to override some behaviors.
Used by project systemsDesktop C#/VB/F#.NET Core C#/VB/F# and C++
Minimum Supported VersionVisual Studio 2008Visual Studio 2015 (some APIs are not available in older versions and there are [breaking changes][changes] in major versions)

Visual Studio Project System

Visual Studio can be extended in many ways, including adding new types of projects and augmenting existing ones. This repository contains the documentation and best practices for creating extensions that add new project types to Visual Studio. We welcome community input if you wish to contribute new topics or find any issues.

To get started, read the introduction while you're waiting for the pre-requisites to install.

Please file any product bugs you find on Developer Community. You may file doc bugs here.

Join the chat at https://gitter.im/Microsoft/extendvs

For further information about extending Visual Studio in other ways please check out Visual Studio extensibility documentation.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.