HomeVisual Studio SCC ClientPrinter Friendly Version

Visual Studio SCC Client

Setting up and using the Visual Studio plugin (SCC)

1. Installation and Setup

1.1. How do I setup Visual Studio to use the PureCM Plug-In?

To use the PureCM Visual Studio plug-in you must install the PureCM client

 

Before using the Visual Studio plug-in you must go to the 'Tools | Options' menu in Visual Studio. The Options dialog contains an entry for 'Source Control'. Select the 'Plug-In Selection sub-page.

The drop-down will contain a list of all source control plug-ins. Select 'PureCM' and then 'OK' to save your changes.

1.2. Failure While Initializing PureCM Souce Control Provider

If Visual Studio gives the error 'There was a failure while initializing the PureCM source control provider. You cannot use this provider to perform source control operations.' You should make the following checks:

  • Ensure that the path for 'PureCM-SCC.dll' is on the PATH environment variable (typically this is 'C:\Program Files\PureCM\Client')
  • Open the Registry Editor. Go to 'HKEY_LOCAL_MACHINE\SOFTWARE\SourceCodeControlProvider'. Ensure that 'ProviderRegKey' has the value 'SOFTWARE\PureCM'
  • Open the Registry Editor. Go to 'HKEY_LOCAL_MACHINE\SOFTWARE\PureCM'.Ensure that 'SCCServerPath' has the value 'C:\Program Files\PureCM\Client\PureCM-SCC.dll' (or wherever it may be installed).

If Visual Studio still gives this error then please email support@purecm.com.

2. Project Operations

2.1. Creating a new project/solution in your workspace

To create a new Visual Studio project directly inside your workspace you simply need to set the project location as a sub directory of your workspace and select the 'Add to Source Control' check box.

VS New Project Dialog

When you select 'OK' you will need to select the workspace and stream that these files will be bound to. In this case PureCM should automaticaly select the correct workspace and stream and so you just need to select 'OK'.

Select Stream Dialog

 This will then launch the submit dialog so you can send the changes to the server. You can either submit these files now or you can keep working with them and submit them when you are ready.

Submit new Files

The Project should now be bound to the correct workspace so that all of the SCC functions such as 'checkout' will now function.

Files Bound

3. File Operations

3.1. Performing Operations on Files in VS

There are two ways to perform PureCM operations on a file inside Visual Studio. By right clicking on a file in the Solution Explorer you are given a brief menu of all of the important operations you can do on the selected file. This menu will change depending on the state of the selected file. For example if you checkout a file the menu will change to include 'Checkin' and 'Undo Checkout'.

VS Solution Explorer SCC Menu

For a more complete menu of all PureCM operatios you need to look at the 'Source Control' menu inside the 'File' menu.

SCC File Menu

3.2. Adding new files

To add a new file into PureCM you first need to add a new file in the normal way inside visual studio. This will show the file inside the Solution Explorer as added.

Added File

In the Pending Checkins tab the new file will be listed as a 'newly added file' and also the project file will have been checked out and modified for the file add. To submit these to the server you will need to check in the changes like normal.

Checkin Pending File Add

3.3. Making local changes to files

To modify a file you will need to check it out. This can either be done by right clicking on a file and selecting 'Check Out for Edit' or letting Visual Studio automatically check out the file when you start to change it.

Checkout for Edit

 

When a file is checked out it's icon in the Solution Explorer will change from a lock to a tick.

Checked out file

Checked out files will also be listed in the Pending Checkins tab as 'Content' changes and can be submitted to the server in the normal way.

Checkout pending submit

3.4. What does Check In do?

'Check In' from Visual Studio can perform one of two operations inside PureCM depending on how you wish to use it.  This is controlled from the main PureCM Options PureCM Optionsinside the PureCM Client and the On the 'General' page there is the 'Submit from SCC on Checkin' option.

PureCM Options Submit on Checkin

Submit From SCC on Checkin

When this option is selected 'Check In' from Visual Studio will act as 'Submit' from inside the PureCM Client. This will open up the 'Submit Dialog' so that you can review your changes and send them to the server. For more information see Submitting your changes to the server. 

Normal Checkin

When this option is not selected 'Check In' from Visual Studio will make a local revision of the file inside your workspace. This will not be submitted to the server and so will not effect any other developers. This can be useful if you want to make a check point in your work, which you can later return to if needed. With this option to Submit your changes to the server you will need to use the PureCM Client.

3.5. Submitting your changes to the server

To submit in Visual Studio you must have 'Submit from SCC on Checkin' enabled in your options menu.

There are two ways to submit a change. You can either select a checked out file and select 'Check in' or you can use the Pending Checkins tab to control which files are selected in the Submit Dialog.  The 'Pending Checkins' tab also allows you to see which files have been checked out inside this Visual Studio project/solution.

Pending Checkins 

By using the Comment section you can set the description for the changeset you are going to submit. To submit these changes you check the files that you want to submit to the server and press the Check In button.

This will open up the Submit Dialog. Any files selected in the pending checkouts tab will also be selected in the submit dialog.

Submit Dialog

When you are happy with the changeset you press the 'Submit' button.

 

Issues

If you have 'Issue Use' enabled you will be then asked if you wish to submit with an issue. You can choose to activate an issue to assotiate with this changeset.

Activate Issue 

You will then be asked to give a description and a time for the issue action you are performing. By default this will use the same description as the changeset you are submitting.

Issue Details 

Then to complete the submit you click the finish button.

Finish Submit

 

3.6. Updating your workspace

To get all of the latest changes from the server you need to right click on any file and select 'Get Latest Version'.

From PureCM 2008/2 both the 'Get' and 'Get Latest Version' will update the entire workspace. You will not be able to update a single file or a group of files at your choosing. All Get operations will act like calling 'update to latest' inside the PureCM Client.

If there is a conflict when updating one or more of the changesets the PureCM resolve tool will be opened for you to manually merge the edits from the server with your own changes.

Update to latest conflict

3.7. Checking the consistency of the workspace

Before submitting your changes it can be useful to make sure that all of your changes have been picked up by PureCM. This is done by running the Consistency Checker.

Before you submit you can open the Consistency Checker from the Submit Dialog by clicking on the Tick icon on the toolbar.

Open Check Consistency

The check consistency wizard works in the same way as inside the PureCM Client and will allow you to find things like new files which haven't been added or modified files which have not been checked out.

Check Consistency Wizard

 

3.8. Working with issues

If you are an issue user you can create, view and modify your issues from the SCC.

To open up the 'View/Modify Issues' dialog you first need to open up the submit window by choosing to checkin some files and then by clicking the Issue icon on the toolbar.

Open Issue Dialog

From this dialog you have access to both 'My Issues' and 'Issue Views' which can be used in the same way as inside the PureCM Client. Issues can be opened by double clicking on them. New Issues can be created by right clicking on the 'My Issues' node.

View/Modify Issues Dialog

3.9. Seeing whats new on the server

In projects where the files physical location is matched by the location inside the project structure (e.g. c#) you can see what has changed on the server since your last update by right clicking on a folder and selecting 'Compare'.

 Compare a Folder

This will launch the PureCM folder compare tool similar to using 'View Outstanding Changes' in the PureCM Client. This will show the differences between the last updated version of the server and the current server version. This will not show any changes made in your workspace.

Folder Compare Tool

The blue highlighted change shows that file has been modified since the last update. To view the change you can double click the file or right click to get a menu. The green highlighted file shows this file has been added on the server since the last update. Colours and filters can be changed within the options menu.

4. Working with Web Sites

4.1. Adding a Web Site to PureCM

This article was written using Visual Studio 2008, but the same should apply for previous versions.

After creating a Web Site in Visual Studio you should select the 'File | Source Control | Add Web Site to Source Control...' menu.

It is important to understand that you do not add the solution file to PureCM. The idea is that each developer creates their own private solution. The developer then gets the web site from PureCM and adds it to their solution.

After selecting the 'Add Web Site to Source Control...' menu the 'Add to PureCM' dialog is launched.

Select the stream you want to add the web site too.

Note that you can right-click a folder and select 'New Stream' if you want to create a new stream for this web site.

This will launch the submit dialog from which you can check the files you want to add to PureCM.

After pressing the 'Submit' button you will notice that the files will appear with a padlock icon, to illustrate that they are controlled by PureCM.

All the PureCM file operations are now available if you right-click a file.

4.2. Getting a Web Site from PureCM

This article was written using Visual Studio 2008, but the same should apply for previous versions.

In Visual Studio select the 'File | Open | Web Site...' menu.

This will launch the 'Open Web Site' dialog. If you select 'Source Control' on the left-hand side you should see the 'Select Source Control Project...' button.

Select this button to launch the 'Get From PureCM' dialog. From here you can select the stream/stream folder where the web site is located in PureCM and the path where it is going to be stored on your local machine.

After selecting 'OK' and then 'Open' in the 'Open Web Site' dialog the files will be downloaded into the specified folder. The website will then be added to your solution.

You will notice that the files appear with a padlock icon, to illustrate that they are controlled by PureCM.

All the PureCM file operations are now available if you right-click a file.

5. General

5.1. 'None of the items in the selection are valid for this operation.' message when closing Visual Studio

To stop this message appearing when you close Visual Studio you need to go to the 'Options | Source Control | Environment' page in Visual Studio and uncheck the 'Check in everything when closing the project' checkbox.