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:
- Support a new project file format.
- Integrate existing file format with a new language service.
- Customize behavior of an existing project system.
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.
Scenario | Recommended Project System Platform |
---|---|
Customize C#/VB/F# Desktop project system | COM-based project flavoring. |
Customize C#/VB/F# .NET Core project system | Not fully supported at this time. VSPS is your best bet. |
Add new a project type or a language | Prototype with VSPS, but be ready to fall back to MPFProj for complex scenarios that VSPS doesn't support yet. |
Criteria | MPFProj | Visual Studio Project System (this repo) |
---|---|---|
Maturity | Release | Preview |
Breaking changes in major updates | None | Expected |
Flexibility | Full control over project system behavior. | Some project system interfaces are not implemented. |
Complexity | High: You will need to understand all project interfaces. | Low: You only need to understand customized behavior. |
Extensibility | Implements project system COM interfaces. | C# with managed interfaces for extension points and MEF. |
Threading model | Single threaded and bound to the UI thread. | Multi-threaded, scalable, and responsive. |
Scalability | Memory-optimized | Uses extra memory to support multi-threading. |
Methodology | Provides 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 systems | Desktop C#/VB/F# | .NET Core C#/VB/F# and C++ |
Minimum Supported Version | Visual Studio 2008 | Visual Studio 2015 (some APIs are not available in older versions and there are breaking changes in major versions) |
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.
For the latest features take a look at Changes.
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.