Blog  |  Contact Us

Search the Knowledgebase Browse by Category
Surround SCM Visual Studio Integration
Last Updated
19th of January, 2011

Surround SCM supports integration with Visual Studio. See Surround SCM Third-Party Integrations for supported versions.

This article includes information about the available integration plug-ins, installing the integration package, selecting the plug-in, adding a solution to Surround SCM, performing Surround SCM actions, setting source control options, license usage, and troubleshooting.

About the plug-ins

Surround SCM provides two integration plug-ins for Visual Studio:

  • Surround SCM Integration Provider plug-in—This plug-in is built using the VSIP API, which allows Visual Studio to access most Surround SCM functionality. If this plug-in is used, a Surround SCM menu is added to the Visual Studio menu bar. This plug-in is supported in Visual Studio 2005 and later.
  • Surround SCM plug-in—This plug-in is built using the MSSCCI API, which allows Visual Studio to access only a limited, basic set of Surround SCM functionality. This plug-in is supported for all supported Visual Studio versions and is the only option for Visual Studio 2003.

We recommend using the Surround SCM Integration Provider plug-in. See Visual Studio Integration – Alternative Plug-In Option for information about using the Surround SCM plug-in.

Installing the integration package

The Visual Studio integration package is installed during the Surround SCM Client installation. If you did not install it, rerun the Surround SCM installer and select the Visual Studio integration option.

Selecting the plug-in

In Visual Studio, choose Tools > Options. Select Plug-in Selection in the Source Control category and select Surround SCM Integration Provider.

vsippluginselection3.png

Adding a solution to Surround SCM

Before you can access source control commands, you need to add the solution and project to Surround SCM. When you put a solution under source control, you are prompted to automatically add all projects and files. When you create a new solution, it is immediately added to source control.

  1. Open the Visual Studio solution and choose File > Surround SCM > Add Solution to Surround SCM. The Surround SCM Repository Browser opens.

    vsiprepobrowser.png
  2. If you want to associate the solution with an existing repository, select the repository and change the working directory to use the directory where the solution file is stored.
  3. If you want to create a new repository, select the branch and repository to use as the parent of the new repository and click Create Repository. The solution file will be stored in the new repository.

    vsipcreaterepo.png
  4. Click OK to close the repository browser. Surround SCM creates a repository for each directory under the solution. The repository structure is the same as the project structure.

Note: Repositories for bin and obj directories are not created in Surround SCM because these files do not need to be under source control.

Performing Surround SCM actions

Select an action from the Surround SCM menu. You can also right-click a file and choose an action or choose File > Surround SCM and then choose an action.

vsipsurroundmenu.png
Note: To view pending changes, choose View > Other Windows > Surround SCM Pending Changes.

Getting files

Get files when you want to view a file but do not need to make any changes. You can automatically get the latest version of files or manually select the files to get in a dialog box.

To automatically get the latest version of files:

  1. Select the files you want to get in the Solution Explorer.
  2. Choose Surround SCM > Get Latest Version. The latest version of the selected solution and project files are retrieved to the working directory.

To manually select the files to get:

  1. Select the files you want to get in the Solution Explorer.
  2. Choose Surround SCM > Get. The Get dialog box opens.

    vsipget.png
  3. To get a file, select the corresponding check box. Clear the check box if you do not want to get the file.
  4. Click Options to select any additional options.
  5. Click OK. The selected files are retrieved to the working directory.

Checking out files

Check out files when you need to make changes to them.

  1. Select the files you want to check out.
  2. Choose Surround SCM > Check Out. The Check Out dialog box opens.
  3. Click Options to select any additional options.

    Note:
    The Recursive option is not available because it does not apply to check outs from Visual Studio.
  4. Click Check Out. The files are checked out.

Undoing check out

If you check out and modify a file and then decide you do not want to save the changes, you can undo the check out. This discards any changes made to the file and checks it back in to the server.

  1. Select the file you want to undo the check out for.
  2. Choose Surround SCM > Undo Check Out. The Undo Check Out dialog box opens.
  3. Click Undo Check Out. The files are no longer checked out.

Checking in files

Check in updates the file with changes and makes it available to other users.

  1. Select the files you want to check in.
  2. Choose Surround SCM > Check In.
  3. Click Options to select any additional options.
  4. Optionally enter any comments.
  5. Click Check In. The files are checked in.

Adding files to a label

You can add files from the current solution to a Surround SCM label.

  1. Select a file in the Solution Explorer.
  2. Choose Surround SCM > Create Label.

    Note:
    Labeling is slightly different in Surround SCM 2009 and earlier.

Viewing file history

  1. Select a file in the Solution Explorer.
  2. Choose Surround SCM > View History.

Refreshing file status

You can query the Surround SCM Server to get the latest status of each file. For example, if you check out a file from the Surround SCM Client, it is not displayed as checked out in Visual Studio until you refresh the file status.

  1. Select the files you want to refresh in the Solution Explorer.
  2. Choose Surround SCM > Refresh Status.

Comparing file versions

You can compare the local copy of a file with the latest revision in Surround SCM.

  1. Select the file you want to compare in the Solution Explorer.
  2. Choose Surround SCM > Differences. The differences utility starts if there are differences between the file versions.

Merging files

You can merge files in a solution and then check in the merge result.

  1. Select a file in the Solution Explorer.
  2. Choose Surround SCM > Merge.

Changing file workflow states

You can change the workflow state of a file. The available states depend on the current state of the file and the workflow used in the repository associated with the file.

  1. Select a file in the Solution Explorer.
  2. Choose Surround SCM > Change State.

Viewing file properties

You can view Surround SCM file properties from Visual Studio.

  1. Select a file in the Solution Explorer.
  2. Choose Surround SCM > Surround SCM Properties.

Viewing changelists

You can view pending changelists from Visual Studio. You may also be able to view your committed changelists depending on the server configuration.

  1. Choose Surround SCM > View Changelists.

Opening projects from Surround SCM

You can open a Visual Studio project from Surround SCM.

  1. Choose Surround SCM > Open From Surround SCM. The Surround SCM Repository Browser opens.
  2. Select the branch and repository where the project is located.
  3. Click OK. The project opens.

Adding projects from Surround SCM

You can add a project from Surround SCM to an existing solution.

  1. Choose Surround SCM > Add Project From Surround SCM. The project is added to the open solution.

Modifying binding settings

You can modify the binding settings for a solution with Surround SCM.

  1. Choose Surround SCM > Bind/Unbind Settings. The Surround SCM Connection Settings dialog box opens.

    vsipscmconnectionsettings2.png
  2. Click Disconnect to disconnect the connection to the Surround SCM Server. The solution is still bound to the branch and repository.
  3. Click Unbind if you want to remove the association between a project or solution and the Surround SCM branch and repository. The solution or repository must be selected to use the unbind option.
  4. Click Bind to associate an unbound project or solution with a Surround SCM branch and repository.

Setting source control options

You can configure source control options, such as the default check in options. Refer to the Visual Studio documentation for more information.

  1. Choose Tools > Options.
  2. Expand Source Control and then select Environment Settings.
  3. Select any options.
  4. Select the Plug-in Settings category and set any options.
  5. Click OK to save the changes.

License usage

A Surround SCM license is used when Visual Studio needs information about a file from Surround. If you are working on a project in Visual Studio and do not perform Surround SCM actions, a license is not needed. Floating licenses may be released after a period of inactivity. By default, Visual Studio is set to automatically perform background status checks with source control providers. When Visual Studio requests file status from Surround SCM, a valid Surround SCM license is required.

Troubleshooting

The Surround SCM menu is not available

  • The Surround SCM plug-in may not be installed. Run the Surround SCM Client installer to install the plug-in.
  • Surround SCM may not be configured as an active SCM provider. Edit the registry to help Visual Studio locate Surround SCM. Open a registry editor utility, such as regedit, and check information in the following registry keys:
    • HKEY_LOCAL_MACHINE/SOFTWARE/SourceCodeControlProvider—Note the value of the ProviderRegKey string. For example, Software\Seapine Software\Surround SCM\Scci.
    • HKEY_LOCAL_MACHINE/—Verify the SCCServerName value is Surround SCM. Verify the SCCServerPath value is C:\Program Files\Seapine\Surround SCM\Surround SCM SCCI.dll. If you installed Surround SCM in another directory, make sure the correct path is used.

Surround SCM files are not displayed correctly in Visual Studio

You added files to Surround SCM, but Surround SCM menu items are not enabled when viewing files in Visual Studio.

  • The Visual Studio project may be configured incorrectly. Make sure the project points to a Surround SCM branch/repository on the Surround SCM Server you are connecting to. To check the information, open the project and solution files in Notepad and check the SCCProjectName value. The format is branch:repository. You can also use the Change Source Control command to check the information in Visual Studio.
  • The branch/repository may point to an invalid working directory. Make sure the working directory for the repository associated with the project points to the same local directory as the project. You may experience problems if you point the working directory to a different location.
  • The local .MySCMServerInfo file may be out of sync and Visual Studio cannot determine where Surround SCM files are located. In the directory where the Surround SCM files are located, open the .MySCMServerInfo file in Notepad. Make sure the correct branch/repository is listed. If not, delete the file and refresh the project from Visual Studio to regenerate it with the correct data.
  • The files may be above the solution in the local directory tree. Visual Studio does not support integration with files that are not in or below the solution’s local directory tree. If the files are above the solution in the tree, create a new solution file at the top level of the source tree and then add the projects to the new solution.

Files cannot be added to Surround SCM from Visual Studio

Make sure you check the Visual Studio Output window for errors when you add files. Following are common causes and solutions.

  • The Visual Studio project may be configured incorrectly. Make sure the project points to a Surround SCM branch/repository on the Surround SCM Server you are connecting to. To check the information, open the project and solution files in Notepad and check the SCCProjectName value. The format is branch:repository.
  • The Visual Studio project may point to the wrong Surround SCM branch. This may occur if you maintain the Visual Studio project and solution files in Surround SCM and then branch the repository that contains the files. After the branch is created, the local .MySCMServerInfo file still points to the old branch, which is where the files are added. Configure Visual Studio to point to the correct branch and then add the files to Surround SCM. Open the project and solution files in Notepad and change the SCCProjectName value to point to the correct branch. Finally, add the files to Surround SCM.

Initialization failure or package load failure when selecting a Surround SCM plug-in

One or both of the following errors is returned when selecting the Surround SCM source control plug-in in Visual Studio 2005:

  • 'There was a failure when initializing the Surround SCM source control provider. You cannot use this provider to perform source control operations.'
  • 'Package Load Failure'

The Surround SCM installer may not add the Surround SCM installation directory path to your computer’s PATH system variable if the resulting variable is more than 1024 characters. Manually add the installation directory path to the PATH system variable and then reattempt to set Surround SCM as the source control provider.

Attachments
No attachments were found.
Related Articles

© 2012 Seapine Software, Inc., All rights reserved.