Visual sourcesafe application code

Source: Internet
Author: User

[By] This article is the source code control solution developed by the author for the team. Use of integration with Visual Studio.

[Body]
Visual sourcesafe application code
2004-6-23

Sourcesafe source code control and Visual Studio. net is tightly integrated. the operations performed by end users in IDE will affect all Working Group members as long as they modify the solution, project, and text or binary files in the directory, the following lists the rules that all members should follow to ensure work efficiency and safety.

Preparations for source code control projects
Visual Studio.. Net project needs to use ide To build the initial project file. both project and solution are units for managing project-related files. before a project starts, a member in the team needs to use the local IDE development environment to create a project. create an applicationProgramIn this processCompositionNaming is a recommended step. In short, it is best to have a set of basic frameworks for applications when adding projects to the sourcesafe database.

The following items need to be considered or implemented before preparation:
1. Various physical Directories
2. Basic static resources required (including image files, scripts, unified style sheets, media, XML, or documents)
3. project reference.
4. Basic page framework. Contains aspx sample (Template) and ascx.

After the basic framework is complete, if there is no sourcesafe database available, a database accessible to all Members should be established and each user account should be created.

Note: Due to the integrated development feature of IDE and sourcesafe, you should not set the permissions below the project level. otherwise, problems may occur. (project management by developers must be based on projects as the minimum management unit .)

After completing the preceding steps, log on to the sourcesafe server with the assigned account. Disable the visual sourcesafe client tool and open Visual Studio. net IDE, open the project, select the current project in the Solution Explorer tree structure, open the command in the file Main Menu: File/source control/Add project to source control... (add the current project to source code control ). the visual sourcesage built-in Visual Studio dialog box is displayed. select the root node ($) of the current database ). the system prompts whether to create a sourcesafe project with the same name as the current project. click Add to add the project to sourcesafe. some problems may occur during this process. generally, this parameter can be ignored.

Note: To use Visual Studio for integrated development with visual sourcesafe, you must update Visual Studio 6.0 to version 6.0c. (You must install the corresponding version of Service Pack 6 ).

At this time, the preparation process is completed.
Optional or subsequent steps
1. add the bin directory to the source code control. under normal circumstances, the project will always require the support of the existing assembly components, you should add the DLL corresponding to external references introduced for the project under the bin directory to the source code control. this is an optional step. if this step is omitted, other members are required to apply local settings.
2. set the web. config is excluded from the project. generally. config. config include to the project.
SynchronizationSource code
In this case, other members of the project team can obtain the source from the server.Code.
The recommended steps are as follows:

1. prepare a local directory with the same project name. Generally, it should be created under the wwwroot $ directory. if you need to specify different local paths for the project, you need to create a virtual directory with the same project name in Internet Information Server Manager. this process must be completed before the source code is downloaded. if any copy of the source code of the previous project is contained, clear the working directory.
2. Open Visual Studio. net ide and run the "/file/source control/open from source control" command on the main menu to open the database you just set. Log On with the allocated account and password.
3. Select the project under the root node. The system will prompt you to select the local path. Select the created path corresponding to http: // localhost/projectname. Relevant source code will be automatically downloaded.
4. The process for downloading source code is displayed. After the process is completed, the Solution Explorer window is automatically opened.
5. If the working directories defined by members are different, check the referances item. If any items are lost, fix the error.
6. If Web. config is excluded from the project, you should obtain its latest copy through other means.
7. Save the current solution. Generally, you will be prompted to save the directory of the solution file (projectname. SLU). Just save it to any directory.
8. Try to build the entire project.
Source Code Synchronization is complete.

Visual Studio settings
 

Special settings should be made for Vsiual studio to facilitate source code control.

The above are recommended settings.
1. Select "obtain the latest source code when solution is enabled"
2. Select "Disable solution and embed all code
3. Select "show non-prompt check out command on Pop menu"
4. Select "check in command not displayed on Pop menu"
5. If "check in is not selected, check out is maintained"
6. Select "Automatically Check out when editing the project". (check out dialog is avoided .)
7. Select "Automatically Check out when saving check in items. (check out dialog can be avoided .)

Code of work
The following lists the rules and rules that each member must comply:
1. When you open a project for the first time, you must request the latest code from the server.
2. Check the latest code from the server at the end of work.
3. Check out project or solution for a long time is not allowed. When a new project is added to the project and any program code is edited, check in project immediately so that other Members can operate the project.
4. Check out of the entire directory is not allowed. Unless necessary, check out too many items at the same time.
5. After a work step is completed, build the entire project to check the current work. If no build error occurs, check in this part of code immediately.
6. It is strictly prohibited to check the code that may not pass the build and check in. This will affect the progress of all members.

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.