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

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

IMPORTANT!  

You must not specify Item Id when creating Items of type PROJECT as this will be generated automatically

To prevent this error, disable the Auto-generate Item Identifier option, which you can find with the Item Type options in the Administration Console. See the Process Configuration Guide for more information.

To add files to source control:

  1. Do one of the following:

    If you want...

    Do this...

    To add a 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.

  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.

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

  6. 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.

  7. 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, or to select a work area. If you select a work area, choose from these options:

  8. solution

    project1

    project2

    The solution folder is the binding root. In this parallel layout:

    root

    projects

    solutions

    The root folder is the binding root.

    The Selected Path setting is automatically set to reflect the correct offset from the location that you select. For example, if the solution file resides under C:\Work\MyProjects\Solution1 and you select a work area path of C:\Work, then Selected Path is automatically set to the correct offset, in this case \MyProjects\Solution1.

  9. If the project or solution exists under a compatible work area (a work area that can be shared with other Dimensions CM clients), the wizard will preselect a repository path to match the work area path. The Create compatible work area option is selected by default (and is the only available option). A compatible work area root is either a folder set as default for the selected Dimensions project or stream, or it is based on Dimensions metadata that sets the work area root.

  10. Click Next and optionally select change requests to relate to the new files. You can select requests from the My Inbox and Working List tabs.

  11. 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.

  12. 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.

  13. 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.