次の方法で共有


Source Control Integration Essentials

Applies to: yesVisual Studio noVisual 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

Visual Studio supports two types of source control integration: a source control plug-in that provides basic functionality and is built using the Source Control Plug-in API (formerly known as the MSSCCI API), and a VSPackage-based source control integration solution that provides more robust functionality.

Source Control Plug-in

A Source Control Plug-in is written as a DLL that implements the Source Control Plug-in API. Registration and source control integration functionality is provided through the API. This approach is easier to implement than a source control VSPackage, and it uses the Visual Studio user interface (UI) for most source control operations.

To implement a source control plug-in using the Source Control Plug-in API, follow these steps:

  1. Create a DLL that implements the functions specified in Source Control Plug-ins.

  2. Register the DLL by making the appropriate registry entries, as described in How to: Install a Source Control Plug-in.

  3. Create a helper UI and display it when prompted by the Source Control Adapter Package (the Visual Studio component that handles source control functionality through source control plug-ins).

    For more information, see Creating a Source Control Plug-in.

Source Control VSPackage

A source control VSPackage implementation allows you to develop a customized replacement for the Visual Studio source control UI. This approach provides complete control over source control integration, but it requires you to provide the UI elements and implement the source control interfaces that otherwise would be provided under the plug-in approach.

To implement a source control VSPackage, you must:

  1. Create and register your own source control VSPackage, as described in Registration and Selection.

  2. Replace the default source control UI with your custom UI. See Custom User Interface.

  3. Specify glyphs to be used, and handle Solution Explorer glyph events. See Glyph Control.

  4. Handle Query Edit and Query Save events, as shown in Query Edit Query Save.

    For more information, see Creating a Source Control VSPackage.

See also