Adding Visual Studio Solutions, Projects, and Files to Source Control

Use the following procedure to add solutions, projects, and files to source control.

To add files to source control:

  1. Do one of the following:

    If you want...

    Do this...

    To add a non-web solution and the projects within it to source control

    Right click the solution in the Solution Explorer and select Add Solution to Source Control, or select File | Source Control | Add Solution to Source Control. If you are connected to Dimensions, you can also right click the connection in the Serena Explorer or right-click a favorite project.

    To add a Web project to source control:

    a   Select the project (not the solution) in the Solution Explorer pane.

    b   Select Add Selected Projects to Source Control.

    To add a project to source control without placing the solution under source control:

    a   Right-click the project in the Solution Explorer pane and select Add Project to Source Control. Note that within solutions that are not under source control, you can only add one project at a time.

    To add new projects to source control when the solution is already under source control:

    a   Select the project or projects in the Solution Explorer.

    b   Right click the projects and select Add Project to Source Control.


    • Do not add website solutions to source control. Select the web project instead. However, the solution containing website(s) can be controlled if it uses a hierarchical layout (the website(s) is located below the solution).

    • When adding a project or file to an existing solution or project that is already under source control you are prompted to check out the relevant file(s) if pessimistic check-out is enabled. If pessimistic check-out is disabled then when you save the solution or project you will be prompted to overwrite the existing read-only versions.

    • The Dimensions item type PROJECT is reserved for project marker files; any other files with the PROJECT item type will be ignored.

    •    Controlled solutions cannot span multiple Dimensions Projects or Streams.

    •    Serena recommends that solutions are contained in their own folder.

    •    Serena recommends that solutions and projects reside in separate folders.

    •    "It is recommended that there should be only one solution in a folder.

    • For multiple solutions, we recommend a parallel structure that allows multiple solutions to be contained in separate folders.  In this layout, the solutions and projects on disk are peers rather than parents / children layout.

    • For multiple solutions that need to share project(s), Serena recommends a parallel structure. In this case, project and solution folders should be separate (unlike parent/child layout).

    • Uncontrolled solutions with controlled projects can be added to source control    provided that they are all in the same Dimensions Project or Stream, and that their repository path is the same as the path that would have resulted if the solution and projects were added in one operation. This is validated prior to attempting the operation; you are notified if the paths are different. After adding the solution to source control, it should be re-opened from source control. This is necessary as the Dimensions metadata for projects in the newly added solution will not match metadata for a solution controlled in one operation. Once reopened, the solution behaves as if it was added in a single operation.

  2. If you are adding a web project, the following dialog may appear. Click the Continue button.

  3. If your current Visual Studio session is not yet logged in to Dimensions, or if current connection is the not correct one for the solution that you are working in, you may need to supply login information for Dimensions.

  4. If you are adding a solution or a project in an uncontrolled solution, the Select Dimensions Project or Stream dialog box appears.

    IMPORTANT!  What appears here depends on how your database is configured. Your administrator can use the Dimenisons Administration Console to choose whether to enable streams, projects, or both. Please see the Serena Dimensions Process Modelling Users Guide for more information. The instructions here apply to projects and streams.

    This dialog box does not appear if you are adding a project in a solution that is already under source control. Select the Dimensions project or stream to which you will add the Visual Studio project or solution. You can also create a new stream or project from here.

  5. Click Next. If you are adding a solution or a project in an uncontrolled solution, you are prompted to select a destination folder in the repository, in the stream or project that you chose. If you are adding a project in a solution that is already under source-control, the project is placed under the root solution location in the repository. Select the folder, and optionally enter a sub-folder path in the Selected path field. Select the Create directory for solution option to create the path if it does not already exist. If the project or solution exists under a compatible work area root the wizard will preselect a repository path to match the work area path. The chosen path will be displayed for the user to confirm but it is not editable. A compatible work area root is either a folder set as default for the selected Dimensions project or stream or the presence of Dimensions metadata indicating a work area root for the selected Dimensions project or stream.

  6. You may be prompted to choose a request to associate with the addition of new files to Dimensions. The requests that appear here are any requests that currently belong to your Working List (and your Inbox with Dimensions issue management). If SBM is the default provider for the base Dimensions database you are working with, you are prompted to choose an SBM request from your current Working List.

  7. Click Next. The Select Design Part screen appears. You can select the design part here that will contain all new items that you add. Your Dimensions administrator can guide you as to the correct design part to choose here, if there is more than one.

  8. Click Next. The Options screen appears. Enter a comment to apply to all of the files that you are adding. This will be stored in Dimensions as the file description for each file.

  9. Click Next. A summary page appears. Review the choices and click Upload when you are satisfied that the options are correct. You can also click Back to change any of the settings.

Once the solution or project and associated files are added to source control, source control icons appear beside each of the files. For example, locked files that are not currently checked out display a blue lock icon. Files that are checked out display a red check mark.