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. This server does not need to install. NET Framework SDK and vs. net, 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", such as 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.