What's New in Source Control for the Visual Studio 2015 SDK
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
In the Visual Studio SDK, you can provide a deeply integrated source control solution by implementing a source control VSPackage. This section describes the features of source control VSPackages and provides an overview of the implementation steps.
The Source Control VSPackage
Visual Studio supports two types of source control solutions. In all versions of Visual Studio, you can still integrate a Source Control Plug-in API-based plug-in. You can also create a VSPackage for source control that provides a deep-integration, Visual Studio SDK path suitable for source control solutions that require a high level of sophistication and autonomy.
A VSPackage can add almost any kind of functionality to Visual Studio. A source control VSPackage provides a complete source control feature for Visual Studio, from the UI presented to the user to the back-end communication with the source control system.
Implementing a source control VSPackage requires an "all or nothing" strategy. The creator of a source control VSPackage must invest a significant amount of effort in implementing a number of source control interfaces and new UI elements (dialog boxes, menus, and toolbars) to cover the entire source control functionality, as well as interfaces required of any package to integrate successfully with Visual Studio.
The following steps give a general overview of what is needed to implement a source control package. For details, see Creating a Source Control VSPackage.
Create a VSPackage that proffers a private source control service.
Implement the interfaces in the source control-related services that are proffered by Visual Studio (for example, the IVsQueryEditQuerySave2 and the IVsSccProvider interface).
Register your source control VSPackage.
Implement all source control UI, including menu items, dialog boxes, toolbars, and context menus.
All source control-related events are passed to your source control VSPackage when it is active and must be handled by your VSPackage.
Your source control VSPackage must listen to events such as those implementing the IVsSolutionEvents3 interface as well as Track Project Document (TPD) events (as implemented by the IVsTrackProjectDocuments2 interface) and take necessary action.