HomeVisual Studio Enhanced ClientPrinter Friendly Version

Visual Studio Enhanced Client

Setting up and using the Visual Studio Enhanced plugin - available from 2009-2 for Visual Studio 2005+

1. Introduction

1.1. What is the Visual Studio Enhanced plugin?

From 2009-2 we introduce a purpose built plug-in specifically designed for PureCM to integrate seamlessly into Visual Studio.  The overall aim is to provide your workspace perspective from inside Visual Studio.
The Main Features ..

No more binding solutions to streams. The new plug-in now works on a workspace level. It knows if your solution is inside a workspace and uses this workspace to access the server.
Simple interface to add your solution to PureCM. If you have a workspace already just copy your files inside and press the 'Add to PureCM' button. If you don't have a stream yet, the same button will give you a simple two page wizard that will create you a stream on the server, a workspace on your client and add your files in a single operation.
Simple way to get your solutions. Get from PureCM offers the familiar workspace create wizard, but will let you select which solution you wish to use on the server before you create your private workspace. This will then create a workspace with the solution in the root folder.

PureCM toolbar. All of your common operations will be accessible from a toolbar inside Visual Studio.

Embedded panel windows. You can open up tabs inside visual studio to make it like the PureCM workspace perspective. These include the changesets tab to view and manage the changesets in your workspace. The Explorer tab to allow you to see and manage files from their structure on disk. And also the event log so you can keep track of what is happening.

 
Important Note
Microsoft only supports custom 3rd party tool integrations for Visual Studio 2005 or newer:
  • The PureCM enhanced Visual Studio client works with Visual Studio Professional editions with any PureCM release from 2009-2 or newer.
  • Support for Visual Studio Standard editions has been added with PureCM 2009-2b.
Users of older Visual Studio versions can obviously still use the SCC integration to integrate PureCM.

2. Installation and Setup

2.1. What versions of Visual Studio does the Enhanced Client work with?

The Enhanced Client will work with Visual Studio 2005 and Visual Studio 2008 - Professional editions. Standard editions are supported from PureCM version 2009-2b.

2.2. How do I install the Visual Studio Enhanced Client?

To install the PureCM Enhanced Visual Studio Client you need to run the PureCM Client Installer or Combined Installer.

The installer will ask whether you want to make PureCM the default Visual Studio plug-in. If you said yes (the default) then Visual Studio will automatically start to use the PureCM Enhanced Client.

You can confirm that it has been installed successfully by opening the Visual Studio 'Tools | Options' dialog. In the 'Source Control | Plug-in Selection' page you will see 'PureCM Enhanced' in the list of available plug-ins. It will be selected if you choose to use this as the default.

2.3. How do I setup Visual Studio to use the Enhanced Client?

To use the PureCM Visual Studio Enhanced 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 Enhanced' and then 'OK' to save your changes.

Note that if you have a solution open which is currently using SCC you should first select 'None'. This will prompt you to close the solution. On opening the solution it will prompt you to remove the SCC bindings from the solution. After doing this you can change the 'Plug-in' selection to 'PureCM Enhanced'.

2.4. How do I switch to the Enhanced Client after using SCC?

If you have a solution which is using SCC integration you should open the solution within Visual Studio.

Open the 'Tools | Options' dialog and navigate to the 'Source Control | Plug-in Selection' page.

If the Enhanced Client is installed correctly then 'PureCM Enhanced' will be available in the list - but you first need to unbind the solution from SCC. Select 'None' as the plugin.


This will prompt you with a warning that the solution will need to be closed.

 

If you open the solution again you will be able to select 'PureCM Enhanced' in the 'Tools | Options' dialog 'Source Control | Plug-in Selection' page.

 

 

2.5. Why does Visual Studio revert back to using the PureCM SCC plugin

If your solution was previously binded to the old PureCM SCC then Visual Studio will automatically switch to use the old SCC plugin if a project was found to have a corresponding .vspscc. Unbind the SCC provider (File/Source Control/Change Source control - Unbind) and then change the Source code Contol provider to be the PureCM Enhanced plugin under Tools|Options.

2.6. Problems switching to Enhanced Client

If you are having difficulties enabling the Enhanced Client, for example the PureCM toolbar is not available or when selecting PureCM Enhanced it immediately reverts back to the previous selection, then try the following steps ..

- In a command prompt run Visual Studio with the '/setup' flag.  eg. "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe /setup". 

If you restart Visual Studio and the plugin is still not working as expected then try...

- Ensure Visual Studio and PureCM Client are not running (Check task manager)

- Uninstall the PureCM Client.

- In a command prompt run Visual Studio with the '/resetskippkgs' flag.  eg. "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe /resetskippkgs". This should start Visual Studio.

- Close Visual Studio.

- Install the latest PureCM client.

- Run Visual Studio. Under Tools/options/Source Control - change the Current Source Control plugin to be PureCM Enhanced.

If the PureCM toolbar does not automatically become visible then add it by right clicking the tool bar area and selecting 'PureCM Source Control' from the list of options.

3. PureCM Views

3.1. PureCM Toolbar

The PureCM toolbar can be enabled by right-clicking on the Visual Studio toolbar and selecting 'PureCM Source Control' from the list.

The toolbar contains the following buttons:

Connect to Server - This will connect to the PureCM server. This will only be available when you are not connected to the server.

Disconnect from Server - This will disconnect from the PureCM server. This will only be available when you are already connected to the server.

Select Active Repository - This is used when getting a solution from PureCM or adding your files without a workspace. PureCM will only list the streams within the active repository.

Get Solution - This will get the solution and all solution files for the selected stream. This will only be available if a solution is not already loaded.

Add Files - This will add the selected files to PureCM. If a folder is selected then it will allow you to add all uncontrolled files beneath it. If the solution is not controlled then it will add the entire solution to PureCM. This will only be available if the selection contains 1 or more files which have not been added.

Checkout File - This will checkout the selected files. If a folder is selected then it will checkout all files beneath it. This will only be available if the selection contains 1 or more controlled files which are not already checked out.

Revert File - This will revert the selected files. If a folder is selected then it will revert all files beneath it. If the file has changed then it will prompt you to confirm. This will only be available if the selection contains 1 or more files which are being changed.

Show Differences - This will launch the PureCM Diff Tool showing the differences between the local version of the file and the last downloaded server version of the file (i.e. the changes you have made).

Show History - This will launch the PureCM File History dialog which will allow you to see all the revisions for a file, compare revisions, revert back to a specific revisions or rollback a revision.

Update to Latest - This will download all the latest changes from the server.

Check Consistency - This will launch the Check Consistency dialog. This will scan the workspace files to see if any files need checking out, adding or deleting.

  Submit Changes - This will launch the Changeset Dialog allowing you select which files you want to submit to the PureCM server.

Refresh Status - This will refresh the status of all files in the solution.

3.2. Workspace Changesets View

The Changesets View can be launched using the Visual Studio 'View | Workspace Changesets' menu. If this menu is not available then check that the PureCM Enhanced Visual Studio Client is installed and setup.

This is the same window as appears in the GUI Workspace View, with all the same operations, so please refer to the User Guide for advanced operations.

'Local Changesets' shows the current changes you are working on in this workspace. Initially checking out files will add them to the Default local changeset. You can create a new local changeset by right-clicking on 'Local Changesets' and selecting 'New'. You can then move change items between local changesets by right-clicking the local changeset and selecting 'Add Change Items'.

You can submit a local changeset to the server by right-clicking the local changeset and selecting 'Submit'.

'Submitted Changesets' shows what changesets have been submitted on the server. You can view a submitted changeset by right-clicking and selecting 'Properties'.

If a changeset has been submitted since you last updated the workspace then the submitted changeset will appear with a warning icon.

3.3. Workspace Explorer View

The Workspace Explorer View can be launched using the Visual Studio 'View | Workspace Explorer' menu. If this menu is not available then check that the PureCM Enhanced Visual Studio Client is installed and setup.

The Explorer View has the same functionality as the Workspace View within the PureCM GUi. Please refer to the User Guide for a description of all the functionality.

The Explorer View is useful for working with files which exist in the workspace but are not included in the Visual Studio solution.

3.4. PureCM Log View

The Log View can be launched using the Visual Studio 'View | PureCM Log' menu. If this menu is not available then check that the PureCM Enhanced Visual Studio Client is installed and setup.

This will display any PureCM related messages

4. General Operations

4.1. Registering your first server connection

4.2. Getting a solution from PureCM

Within Visual Studio select the 'File | PureCM | Get Solution' menu.

Or you can press the 'Get Solution' button on the toolbar.

This will launch the 'Select Visual Studio Solution' dialog.

Select the stream containing the solution in the tree. Note that this will only list streams within the active repository. If you select a stream or folder containing 1 solution file, then a workspace will be created and this solution will be opened. If you select a stream or folder containing more than 1 solution file then PureCM will ask you to select the solution file. Alternatively you can expand the stream or folder and select the solution file.

The Workspace Path is used to determine where the workspace will be created on the local machine.

The Display Name is the name by which the workspace will be referred to.

For 'Advanced Options' please read the User Guide 'Workspace Options' chapter.

On pressing 'OK' a workspace will be created for the selected stream/stream folder and the selected solution will be open. You will notice that the solution, project and all files will appear with a padlock to show that they are controlled by PureCM.

4.3. Adding a solution to PureCM

Within Visual Studio select the 'File | PureCM | Add to PureCM' menu.

Or select the 'Add Files' button on the toolbar.

This will launch the 'Add to PureCM' dialog asking for a stream name and a folder where the stream will be created.

This will only allow you to add a stream into the active repositoy. If you wish to use a different repository you can change it from the toolbar.

You can create a new stream folder by selecting the parent folder in the tree and pressing 'Create New Folder'. This will prompt you for the folder name.

If you want to add the solution to an existing stream then you must create a workspace for the stream and add the project to the workspace.

Clicking 'Next' will list the files which will be added to the stream. You can uncheck any files you do not want to include.

Click 'Finish' to add the files to PureCM. You will then notice that the solution, project and files will appear with a padlock to show that they are controlled by PureCM.

4.4. Submitting files (checkin)

To submit your changes press the 'Submit' button on the toolbar or right-click the local changeset within the Workspace View and select 'Submit'.

This will launch the Changeset Dialog where you can visualise the changes you have made.

The Changeset Dialog is described in more detail in the 'Submitting Changes' section of the User Guide.

You can uncheck any files which you do not want to include as part of the submit.

If you are happy with your changes then press the 'Submit' button to submit your changes to the server.

4.5. Update to latest (getting the latest code from the server)

When another user submits some changes to the server for the same stream as your workspace you will need to run 'Update to Latest' to integrate those changes into your workspace.

This will download all changes from the server. You cannot download individual changesets or individual file changes.

You can update your workspace by either navigating to the option in the File > PureCM menu and select 'Update to Latest' or simply click on the icon in the PureCM toolbar.

Update to Latest menu

If multiple checkout is enabled (developers can edit the same file at the same time) then it is possible that someone has changed a file which you are working on. In this case the Resolve Tool will be launched to help you merge your changes with theirs. This is described in the User Guide 'Resolving a Changeset' chapter.

4.6. Check consistency

Before you submit your changes to the server it is often useful to check the consistency of your workspace. This will tell you if any differences between your workspace and what PureCM expects your workspace to look like. For example if you have changed or removed a file without telling PureCM.

You can launch the consistency check once you have a solution loaded in Visual Studio that has a workspace. You can either navigate to the check consistency menu item from the File > PureCM menu or simply click on its icon in the PureCM toolbar.

Check Consistency Menu 

The User Guide 'Check Consistency Wizard' chapter goes into detail about all the different options.

4.7. Refreshing the status

Sometimes if you work in multiple PureCM clients at the same time Visual Studio can get out of sync with your workspace. The refresh status button is available to get everything back to normal. The refresh status button will refresh all of the visual studio file states as well as all of the PureCM views and toolbar.

 

To refresh the status of your workspace you can either navigate to the menu item from the File > PureCM menu and select Refresh Status, or simply press the button on the PureCM toolbar.

Refresh Status Menu 

4.8. Change the active repository

You can only change the active repository before either adding your solution to PureCM or before you get a solution from PureCM.

You can open the active repository dialog from the Visual Studio PureCM toolbar.

5. File Operations

5.1. Showing differences (what's changed)

To see what changes you have made to a file you can right-click the file and select 'Show Differences' or use the 'Show Differences' toolbar button.

This will launch the PureCM Diff Tool showing the line-by-line changes you have made.

 

You will also get a chance to see the file differences in the Changeset Dialog when you submit your changes.

5.2. Viewing a file's history

To view the history of a file you can right-click the file and select 'Show History' or use the 'Show History' toolbar button.

This will launch the 'File History' dialog, showing each revision of the selected file.

The 'File History Dialog' is described in more detail in the User Guide 'File History' chapter. The most common operations are:

  • Select a revision and use the 'Compare with Previous Revision' menu to show the line-by-line differences between this revision and the previous revision.
  • Select 2 revisions and use the 'Compare Revisions' menu to show the line-by-line differences between the 2 revisions.
  • Select a revision and use the 'Show Changeset' menu to launch the Changeset Dialog which created this revision. This will show you what other files were changed when this fle was changed.

5.3. Deleting files

When you delete one or more files in a Visual Studio project (e.g. right-click the files and select 'Remove') you will get a prompt asking if you want to delete the files in PureCM.

If you choose 'Yes' then the file will be marked as deleted in PureCM. The file will appear in your local changeset as deleted.

After you have submitted the local changeset, the file will be deleted in other developer workspaces when they 'Update to Latest'.

5.4. Checking files out

You need to check out a file before you start editing it. To checkout a file right-click the file and select 'Checkout' or use the 'Checkout File' toolbar button. The file will then appear with a red tick to indicate that it is checked out.

The file will also appear in the the default local changeset if the Changeset View is open.

Alternatively you can check out a file by editing it in the Visual Studio editor. As soon as you try and edit a file which is not checked out you will get the following prompt:

Selecting 'Checkout' will checkout the file and allow you to carry on editing the file. If you select 'Don't show this dialog again' then files will automatically be checked out when you start editing them (without showing the prompt). You can also change this setting in the Visual Studio 'Tools | Options | Source Control | PureCM Options Page'.

5.5. Adding files

When you add a file to a Visual Studio project you will get a prompt asking if you want to add the file to PureCM.

If you select 'Yes' then the file will be added to the default local changeset if the Changeset View is open.

If you select 'No' then the file will remain uncontrolled. There are some situations where this is desirable, e.g. auto-generated files. 

If you check the 'Don't show this dialog again' option then all files will automatically get added to the default local changeset when you add them to Visual Studio. Remember that you can check whether you want to add them in the Changeset Dialog when you submit local changeset. If you decide the file should be uncontrolled you simply revert the add.

You can also modify this option in the Visual Studio 'Tools | Options | Source Control | PureCM Options Page'.

5.6. Reverting files

6. Advanced Operations

6.1. Rolling back a submitted changeset

6.2. Shelving a local changeset

6.3. Unshelving a shelveset

6.4. Merging a submitted changeset from another stream

6.5. Working with multiple local changesets

7. Troubleshooting

7.1. I have submitted changes from another client and visual studio still thinks they are checked out

If you submit some changes from another client (for example the PureCM GUI) while visual studio has that workspace loaded you can sometimes get a case where visual studio still shows your files are checked out after the submit.

In this case all you need to do is hit the refresh status button for visual studio to detect the changes.

7.2. The menus in the Changeset View or Workspace View are not working in Visual Studio

There is a bug were none of the menus will work within the Changeset View or Workspace View immediately after you have selected to use the PureCM Enhanced Client as your source control provider.

If you restart Visual Studio the menus will be working and the problem will not happen again.

7.3. The Plugin Is Not Loading Correctly

If the PureCM Enhanced Visual Studio Plugin is not loading correctly then the first thing to do is reset the Visual Studio packages.

You do this by launching VS on the command with the 'resetskippkgs' and 'log' flags (i.e. 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe /resetskippkgs /log').

The log will be created in {USERPROFILE}\{AppData}\Microsoft\VisualStudio\{Hive}\ActivityLog.xml).

Please email this log to support@purecm.com.