The ability to reuse code is an important part of managing software development. If you set up your project structure so that each component is self-contained, you can share that component with other solutions through the use of MKS Integrity subprojects. By referencing the original subproject, MKS Integrity allows you to share a subproject and the members it contains between two or more projects. Shared subprojects do not have to be located within the same directory structure or project hierarchy.
To share project code, you need to add the project as a shared subproject in MKS Integrity, then add it as an existing project in Visual Studio .NET 2003. Non-Web projects are shared at the solution level; Web projects are shared at the solution root level.
NOTE Within the integration, sharing a variant subproject is possible but not recommended.
To set up shared subprojects for non-Web applications
1 In the Visual Studio .NET 2003 Solution Explorer panel, select the solution, then select File > Source Control > MKS SCC Integration.
2 In the Sandbox view, select the solution Sandbox and add the shared subproject. For more information on how to set up shared subprojects, see the MKS Integrity Client 2009 User Guide.
3 Resynchronize the new shared subproject. 4 Close the Sandbox view.
5 In the Visual Studio .NET 2003 Solution Explorer panel, select the solution, then select Add > Existing Project.
6 Select the project to add. You are prompted to check out the solution file. 7 Check out the solution file.
To set up shared subprojects for Web applications
1 In MKS Integrity, select and open the solution root project and add the shared subproject.
IMPORTANT You must share the subproject using the same name as the original subproject, for example, WebApplication1/project.pj.
For more information on how to set up shared subprojects, see the MKS Integrity Client 2009 User Guide.
2 Create a Sandbox from the newly shared subproject.
3 In the Visual Studio .NET 2003 Solution Explorer panel, select the solution, then select Add > Existing Project.
4 Select the project to add. You are prompted to check out the solution file. 5 Check out the solution file.
6 Check in the solution file. To share project members
1 Select a project in Visual Studio .NET 2003 and choose Source Control > Share. The Add Members From Archive wizard displays.
2 Select a member to be added from archive and click Finish. The Add Member From Archive dialog box displays.
3 To add the member from archive, click OK. The selected member is added to the Visual Studio .NET 2003 project and shares the same archive as the member in the source project.
NOTE If the member revision is updated in the source project, it is not updated in the project it is shared to. The member revision in the shared project must be updated manually.
Setting Up Master Projects
If you want to group multiple solutions, you need to create a master project to contain the solutions.
To group solutions under a master project, you need to create your project structure in MKS Integrity, then add your Visual Studio .NET 2003 solutions to it.
To set up Master Projects
2 In MKS Integrity, create your master project.
For more information, see the MKS Integrity Client 2009 User Guide. 3 Create the subproject that you want to use as your solution root.
For more information, see the MKS Integrity Client 2009 User Guide.
4 Create a subproject inside the subproject you created in step 3 and name it <solution name>/project.pj.
5 Create a Sandbox from the subproject you created in step 4 and place it in your solution directory.
6 In Visual Studio .NET 2003, select your solution and click File > Source Control > Add Solution to Source Control. You are prompted to add the solution files to your Sandbox location.
7 Repeat steps 1-6 for additional solutions.
Setting Preferences
You can now set MKS Integrity Client preferences from within Visual Studio .NET 2003 using the Preferences Configuration option.
To set MKS Integrity preferences
1 Select Tools > Options. The Options dialog box displays.
2 Click to expand the Source Control folder in the left pane, and select SCC Provider. 3 In the right pane, click Advanced. The MKS Integrity Client Preferences Configuration
panel displays, allowing you to modify settings for the MKS Integrity Client and MKS Integrity.
4 Make the necessary changes to the preferences. For more information, see “Required Settings” on page 120.
5 Click OK to save the changes and close the Preferences Configuration panel. 6 To save the changes and close the Options window, click OK.
Required Settings
You must also set the following MKS Integrity Client preferences to make the integration work smoothly:
Under the Configuration Management node, click the Commands folder and under the Add Members command, select the Create Subprojects option. This enables subprojects to be created for sharing project components.
NOTE If you select the Create Subprojects option after adding non-Web projects,
and then add new members to those projects, see “Troubleshooting” on page 134 to resolve the issue. If you do not resolve the issue, you will encounter Sandbox detection problems when performing operations in the integration.
Under the Configuration Management node, click the Commands folder and under the Check In command, select the Check In if Unchanged option. In Visual Studio .NET 2003, there are several cases where multiple files are used to represent one thing. When a change is made, it is typically made to one of the set of files, but Visual Studio .NET 2003 checks out all associated files and attempts to check in all associated files. Selecting this option prevents users from getting potentially confusing messages.
For more information on setting preferences, see the MKS Integrity Server 2009 Installation and Configuration Guide.