IBM Support

Visual Studio 2008 add to source control menu option is grayed out

Troubleshooting


Problem

This technote explains how to resolve an issue that can occur when you have a Microsoft Visual Studio solutution that you want to add to IBM Rational ClearCase source control and the ClearCase menu option to 'add to source control' is grayed out (inactive).

Symptom

You have a Visual Studio solution and you want to add it to ClearCase source control.
The ClearCase menu is there, within Visual Studio, but the option to 'add to source control' is grayed out.

You are not able to add your solution to ClearCase source control from inside Visual Studio.

Cause

One cause for this issue could be that the Visual Studio Solution has already been added to source control outside of Visual Studio.

Another cause could be that the Visual Studio Solution has not been copied into a ClearCase view and a ClearCase VOB in the 'right way' (which is actually using the command line or Windows Explorer to copy).

Environment


Resolving The Problem

Use the method described below to add a Visual Studio Solution to source control.

After creating your new Solution in Visual Studio, use this method to add it to ClearCase source control.

The steps are in short:

First you have to copy the solution to a ClearCase VOB outside of Visual Studio. Then you go back to Visual Studio and open the solution in a view, in the VOB and then add it to source control.

  1. Use Windows Explorer or the command line (CLI) to copy the solution folder and all contents into a ClearCase view and ClearCase VOB.

    Example:
    \my_view\my_vob\my_solution_folder
  2. Do NOT add the solution to source control at this time.

    Everything should exist as view private files and directories.
  3. Start Visual Studio.

    Choose Open Solution and browse to the view and VOB that contains the solution you just copied.
  4. Open the .sln file.

    If you receive a dialog box stating, The project location is not fully trusted, click OK to dismiss it.
  5. In the VS.NET Solution Explorer, right-click on the Solution (highest node in tree) and select 'Add Solution to Source Control'.
  6. You can also use this method to add an already worked on Solution to ClearCase source control.

    However, if you have already attempted to manually add your solution to ClearCase source control in any other way, then you must first remove (rmelem) everything from ClearCase and start over using the above procedure.

    The reason for this is that each type Solution in Visual Studio (and there are many types) has a different combination of files and directories - and some must be left outside source control as view private.

If you use the above mentioned method, the correct files are added - or not added as appropriate.

If you use other methods (add to ClearCase first, then edit manually so it works in Visual Studio) it might work, however, often it does not and you can run into multiple problems.

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Integrations: Visual Studio.NET","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0.1;7.1;7.1.1;7.1.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
07 November 2019

UID

swg21429258