You can join the development of a solution already under source control by creating a Sandbox corresponding to that solution on your local machine.
If you are creating a build Sandbox, see “Building Projects” on page 124.
NOTE If you are creating a Sandbox for a master project that was created and placed under source control before using MKS Integrity (but not migrated to a solution root), each time the Create Sandbox Wizard displays for a Web project, you must
select the MKS Integrity project that corresponds to that Web project.
To create a Sandbox in Visual Studio .NET
Select the subproject of the solution root containing the Visual Studio .NET solution (SLN file) under version control that you want to create a Sandbox from. Select File > Source Control > Open From Source Control. The Create Sandbox Wizard displays. Create a Sandbox as described in the MKS Integrity Client 2009 User Guide.
NOTE If an existing Sandbox is detected in the solution directory, the Get SCC Project Path dialog box displays. To add the solution to source control, click Yes.
Binding a New Variant Solution or Project
When first creating a new variant solution, Visual Studio .NET displays a message to indicate that the binding is different from what is recorded. This message must be addressed prior to the addition of any new project; however, this message can be generally ignored for
continued operations in the existing solution and projects.
To correct the bindings for a new variant solution or Web project
1 In Visual Studio .NET, choose File > Source Control > Change Source Control, and in the Source Control window, click Unbind. Once the solution is unbound, click Bind to rebind the solution. This corrects the solution binding to point it to the variant project.
2 If the member is not already checked out, you are then prompted to check out the solution control file. After checking out the solution control file, check the file back in to source control.
Once the binding is corrected, new Web projects are then correctly added as variants and users creating another instance of the variant will no longer have to correct the bindings for that instance.
Adding Members to an MKS Integrity Project
You can add new members to source control by checking them in.
NOTE If you previously added non-Web members to source control without creating subprojects for them, and are adding new members to those projects, see “Troubleshooting” on page 134 to resolve Sandbox detection errors.
To add members to an MKS Integrity project in Visual Studio .NET
1 In Visual Studio .NET, select one or more files to add to the MKS Integrity configuration management project.
2 Select File > Source Control > Check In. The Visual Studio .NET Check In dialog box displays.
3 Click Check In. The Create Archive dialog box displays.
4 Modify the Create Archive options as necessary as described in the MKS Integrity Client
2009 User Guide.
Each file under version control corresponding to an MKS Integrity member is marked in the Solution Explorer with the icon.
Checking Out Members
To check out members in Visual Studio .NET
1 In Visual Studio .NET, select one or more files to check out.
2 Select File > Source Control > Check Out. The Visual Studio .NET Check Out dialog box displays.
3 Click Check Out. The Check Out dialog box displays.
Use Optimistic Locking specifies if to use optimistic locking when checking out the member. Clear this option to get an exclusive lock on the member.
IMPORTANT If optimistic locking is enabled, you cannot have an exclusive lock on the member. The member displays in the Solution Explorer with a icon. For more information, see “Optimistic Locking” on page 121.
In the MKS Integrity GUI, there is no icon marker for members that have optimistic locks.
The file displays in the Solution Explorer with a icon denoting that it is checked out with a lock.
Checking In Members
If optimistic locking is enabled, your checked in changes are merged with the latest revision, rather than contained in their own revision. Binary files cannot be merged, but instead they overwrite the member revision. For more information, see “Optimistic Locking” on page 121.
NOTE If another user has an exclusive lock on a member that you have an optimistic
lock on, you must wait until that user checks in the member (thereby releasing the exclusive lock) before you can check in your changes. For more information, see “Optimistic Locking” on page 121.
To check in members in Visual Studio .NET
In Visual Studio .NET, select one or more files to check in. Select File > Source Control > Check In. The Visual Studio .NET Check In dialog box displays. Click Check In. The Check In dialog box displays. Check in each member as described in the MKS Integrity Client 2009 User Guide.
IMPORTANT If optimistic locking is enabled with auto merge, the changes are merged with the latest revision automatically. If auto merge is not enabled, then you are presented with the option to merge manually.
If you are checking in a binary file, you are prompted to overwrite the member revision with the working file contents.
Troubleshooting
Problem Solution
The file is not a current or destined or pending member or subSandbox of project (after Create Subprojects option is selected in Add Member command preferences).
Occurs when trying to check out a member after adding Visual Studio .NET non- Web projects to source control as MKS Integrity subprojects, when non-Web projects were previously added as subfolders only. This occurs because the Create Subproject option was selected in the MKS Integrity Client preferences after already adding .NET projects, and then new members were added to the non-Web project.
If a non-Web project is added to source control with the Create Subprojects option not selected in the client preferences, it is added as a sub folder in the MKS Integrity configuration management project. If you select the option at a later date, any new members added to the non-Web project will create a subproject in the folder for that member.
Workaround: Before continuing to use source control with any members that were added before enabling Create Subprojects, migrate them from the sub folder to the subproject.
If you do not migrate the sub folder members to the non-Web subproject, you will encounter Sandbox detection problems when performing operations in the integration.
Working file revision contents failed to revert after cancelling a check in operation.
Occurs when cancelling a check in operation on an optimistically locked member after previously accepting a merge operation. By accepting the merge, you have accepted the introduction of another user’s work into your Sandbox working file. Workaround: None
Sandbox not populated with members after creating a new Sandbox through the VS .NET integration.
Occurs when selecting the solution project file rather than the project that contains the SLN file during an Open From Source Control operation. Workaround: Select SLN file when performing Open From Source Control operation.
Sandbox for Web project created as top level Sandbox when should be subSandbox. Sandbox on main trunk when should be on same variant as solution.
Occurs when you added the Web project to source control using the Add Selected Projects to Source Control command.
Workaround: Drop the Web projects from MKS Integrity, and then add the Web projects from the .NET integration using the Check In command.
Error Message: "You already have a local copy of the solution or project you selected. Use the Open Solution command on the File menu to open the local copy."
Occurs when you are attempting to join the development of a solution already under source control by creating a Sandbox corresponding to that solution on your local machine, but that the following has occurred:
You attempted to create the Sandbox through the integration using the Open From Source Control command.
The user who created the solution added an existing project, which is located outside of the solution tree, to that solution before placing it under source control.
Workaround: Create a Sandbox for the solution using the MKS Integrity Client instead of the integration. When creating the Sandbox, be sure to select the subproject that contains the SLN file for the solution, not the root project. Then open the Sandbox through the integration using the Open From Source Control command.
Error Message: “Refresh source code control status: The operation could not be completed”
Occurs when you are attempting to add a project to source control using the Add Selected Projects to Source Control command.
Workaround: In the MKS Integrity Client connection preferences, in the Prompt for area, clear the User Name and Password options.