Visual Studio. Net team development

Source: Internet
Author: User
1. Preparations before development 1. Install. net Framework SDK, Visual Studio. Net, and Visual Source Safe 6C on a machine with Windows 2000 or Windows XP Professional. (If your operating system is Windows. net Server, you do not need to install. net Framework SDK ,. the IIS 6 that comes with Net Server already fully includes the pair.. Net) these tools are supported in Visual Studio. net can be found on the installation disk. 2. A server dedicated to storing the version control center database. You do not need to install. NET Framework SDK and VS.net on this server, but must install VSS 6C. We call this server the Development Server DataCenter. 3. A primary domain controller adds the DataCenter server to this domain and assigns a domain account to each developer. In this way, all Group members can log on to the Window NT domain to access version control information. Note: Visual Source Safe 6 in Visual Studio 6 does not support some. Net file formats. If you have installed VSS 6, you also need to install VSS 6C again. Otherwise, an error will occur when you add the source code to the VSS database in the VS. Net environment. 2. Before creating an empty SourceSafe database, you must create an empty SourceSafe database to store source code control data and assign access accounts to group developers. Create a Source Safe database on the DataCenter server. Step 1: Start SourceSafe 6.0 Admin under "start" -- "program" -- "Microsoft Visual SourceSafe. If VSS 6C is installed for the first time, the Admin account of the Common database is empty. 1:
Figure 1 VSS logon window 2. In the Visual SourceSafe Administrator window, you can see the default Admin and Guest users of Source Safe. If you do not plan to use the default Common database, you need to create a project database of your own. Select the menu "Tools" -- "Create Database", as shown in Figure 2:
Figure 2 VSS Management window 3. In the displayed dialog box, select the location where the new database is stored. Here we select C: \ SourceManager \. Click OK to prompt that you have created a database. 4. Select "Users" -- "Open SourceSafe Database... ", Use the Browser button to select the created SourceManager database C: \ SourceManager \ srcsafe. ini. 5. Run the "Users" -- "Change Password" command to Change the Password of the Admin account. Use the "Users" -- "Add User" command to create a SourceSafe account for the project team members. 6. Set the C: \ SourceManager directory to share. By default, the shared permission is fully controlled by Everyone. If you want to open only to project team members and do not want others to operate on database files (Note: a person without a SourceManager account cannot access the content in SourceSafe, but if he has permissions, can delete or modify data in the database), please delete the Everyone group from the permission group, and select the domain account or computer that can access the directory from the domain directory. 7. At this point, an empty project database has been created. 3. Create a project and add version control. create a Windows application and a Web project, and add it to the SouceManager database created above. 1. Start VS. NET. 2. Run the "file" -- "new" -- "blank solution" command to create a solution SourceManager under D. VS. Net will automatically create a SourceManager directory under D: \, which contains a solution file SourceManager. sln. 3. Run the "file" -- "new" -- "project" command, select "Visual C # Project" in the project type, and select "Window application" in "template ". Project name MyWindowApp. Select "add SOLUTION. OK.

Figure 3 new Windows application project Window 4. Use the "file" -- "new" -- "project" command, select "Visual C # Project" in the project type ", in "template", select "ASP. NET Web application ". Fill in http: // localhost/MyWebApp in the "location" column. Select "add SOLUTION. OK.

Figure 4 create a Web application Window so that a Window application and a Web application are created in the solution. The following describes how to add the entire solution to source code version control. 5. Add a Label control to the designer of WebFrom1 and Form1 to keep its attributes unchanged. This control is also displayed on the user interface of the program obtained from another host. 6. Run the "file" -- "Source code management" -- "add solution to source code management" command.

Figure 5 source code management menu 7. Click "Browser" in the pop-up Visual SourceSafe Login logon window. The database dialog box is displayed. Click "Browser" in the dialog box to bring up the following dialog box, enter \ DataCenter \ SourceManager \ srcsafe in "file name. ini. After confirming, enter the SourceSafe account and password allocated above.

Figure 6 open the VSS database Dialog Box 8. A Prompt window is displayed to save the solution. You can select the name of the project to be saved to SourceSafe, which is the same as the solution name by default. Click OK. A message is displayed indicating that the project does not exist in the Database. Click "Yes" to create the project.

Figure 7 create a project in VSS dialog box 9. Next, let you select the Save location of the Web application. As shown in. Because Web applications are usually stored in the local IIS root directory. It is not in the same directory as other projects in the solution, so you need to create a separate project for the Web application in SourceSafe. In this window, click "OK" to accept the default project name MyWebApp of SourceSafe.

Figure 8 create Web project dialog box 10 in VSS. At this point, we have added the entire solution in SourceSafe, including a Windows application and a Web application. In the Solution Explorer view, there is a lock next to the program added with source code control (as shown in 9), indicating that the document has been checked in and cannot be edited.

Figure 9 Solution Explorer 11. Open SourceSafe through the menu "file" -- "Source code management" -- "Microsoft Visual SourceSafe". You can see that two projects have been added to SourceSafe. 10:

Figure 10 VSS Browser

4. Obtain the source code from SourceSafe on another host in the following steps of the project in SourceSafe. 1. Open the Visual Studio. Net development environment on another host. Use the menu command "file" -- "Source code management" -- "open from source code management ". Repeat the 7th operations in step 3 and select the location of the SourceSafe database. 2. the "Create local poject from SourceSafe" window is displayed. in the "Create a new project in the" input box, enter the local path of the project to be saved. Here we select "C: \ MyProject ". In "SourceSafe project to", select the SourceManager project and click OK. If the directory C: \ MyProject does not exist, you will be asked whether to create it. Select "Yes All ".

Figure 11 "Get project from SourceSafe" dialog box 3. The "save Web application work copy" dialog box is displayed. In the "Work Copy location" text box, enter the Web folder of the Web application you want to save, you can also accept the default settings. Click OK to accept the default settings.

Figure 12 obtain a Web project from SourceSafe Dialog Box 4. Through the above steps, we have successfully obtained the project saved in SourceSafe on another development host. If a new developer joins in the future, you only need to repeat these four steps.

5. Concepts of version control are listed in the context menu or file of Visual Studio. Net development environment "solution Resource Manager", which contains the following commands related to file operations, as shown in section 13:

1. Check Out: When you need to edit a file, you must "Check Out" the file. SourceSafe indicates that the file has been moved Out by a user, make sure that other users cannot edit the same file. This option is available only when the file is checked in. 2. Check In: After editing a file, you are advised to Check In the file so that other users can Check out the file or obtain the latest version. This option is available only when the file is checked out. 3. "Get the latest version": Get the latest version of the specified file or project from the SourceSafe database without having to check out the file. 4. "cancel the check-out": Do not save the changes made after the check-out in the SourceSafe database, restore the local file to the State before the change, and check the file in. This option is available only when files or projects have been checked out. 5. "History": view the modification history of a file. The SourceSafe database automatically saves the file content before and after each check-in. If you want to view the history. 6. "version comparison": You can compare the differences between the current version and the historical version. SourceSafe will display the differences between the two versions in the form of comparison. 14:

Figure 14 version comparison 7 and "Roll Back": In the "show previous versions" dialog box, a Roll Back command is provided to restore the file to a previous version. When an error occurs in file editing, you can use this command to return the file to a previous point. The previous version display dialog box contains other commands, which are not described in detail here. Please study them slowly. 8. Options for Version Control in Visual Studio. Net: In the "Tools" -- "options" command dialog box, select "Source code management" on the left to display the following dialog box. You can set the SourceSafe option based on your project.

Figure 15 Visual Studio. options 9 related to version control and other SourceSafe operations in. Net: You can go to the "Visual SourceSafe Explorer" from the "file" -- "Source code management" -- "Microsoft Visual SourceSafe" menu ", most of the main Commands are similar to Visual Studio.. Net.

6. Manage a version control project. The following describes some permission management and file ing related to version control. First Open "start" -- "program" -- "Microsoft Visual SourceSafe" -- "Visual Source Safe 6.0 Admin" on the DataCenter server ". Select the SourceManager database and enter the Admin account password. Enter the "SourceSafe Administrator" window. It has the following menus.

1. The Users menu contains commands for User operations, except for the "Add User" and "Change Password" commands we used above, you can also run the "Delete User" and "Edit User" commands to Delete users. The "Open SourceSafe Database" command is used to change the current SourceSafe Database. 2. The Options dialog box under the Tools menu contains some project settings. The following describes the main options: (1) Allow multiple checkouts on the General page. If this option is selected, multiple users are allowed to check out the file at the same time. It is not allowed by default. (2) The "Enable Project Security" check box on the project security page indicates whether Security is allowed for the Project. This item is not allowed by default. Only after this option is selected, "Rights by Project", "Right Assignments for User", and "Copy User Rights" under Tools are available. Here we select it. (3) The Shadow Folders page is used to set the project ing on the server. The project saves all the version information of the file in the format of binary code in SourceSafe. Create a directory on the server, map the project file to this directory, and use this command. In "Set shadow folder for project", select the SourceManager project in SourceSafe, and select the directory to which the project is mapped in "Set shadow folder to", for example, C: \ SourceManager_Shadow. (4) The Web Projects page is used to set the Web ing of Web Projects on the server. In This project represents a Web Site, select the MyWebApp project in SourceSafe and enter "http: // localhost" in the URL, that is, the Local Web Server (or other servers ). Fill in the Virtual directory to be mapped in Virtual Tools, and fill in the deployment directory in "Deployments path". This directory will become the ing directory of the specified Virtual directory in IIS. 3. "Rights by Project" under the Tools menu manages the Project permissions in SourceSafe ,. There are four types of user permissions: R (Read), C (Check Out/Check In), and A (Add/Rename/Delete), D (Destroy ). Select a Project in the "Project" box on the left, select the corresponding user on the right, and use the check box below to assign the corresponding permissions to the user. The "Rights Assignments for User" in the Tools menu is used to assign permissions to the selected users. The operation result is the same as the preceding command.

Figure 19 VSS project permission management 4. Archive Projects under the Archive menu is used to package a specified project *. the ssa (SourceSafe Archive) file is migrated to another host. Use the Archive "Restore Projects" command to Restore the file to another host. These two commands are used for project migration.

By summarizing and using the SourceSafe and VS. Net development environments, we can provide a complete source code management solution for team development. Through source code management, you can record the project development process, restore files to a certain point in the project process, without saving too much backup of old documents in the development environment.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.