VS.NET Web Project uses Visual Source Safe for source code management

zhaozj2021-02-17  48

During this time, it is a .NET project, a project development group 3 people, the development environment is VS.NET, the language is C #, three people cooperate development. Since it is a collaborative development, you have to find a source code control software to conduct source code management and version control in development. What we first thought of is ClearCase, a great name, and everyone has never used it, I want to taste it. Who knows this stuff is really too complicated, first to install Active Directory on the Window2000 (this will get a whole day), then it is a license problem, and it is finally installed, it can run. Look at so many program items, so many documents, a word: halo, what is the same, it is so complicated, and it is not to be alive. Since then, no one will mention ClearCase, they are self-satisfied, and they can not do this. The next choice is VSS, compared with ClearCase, VSS is really cute, small and exquisite, although there is no ClearCase, but for generally not a big project is enough.

We are basically smooth during use, and the Window application project is very simple. It is not available in the use of a problem. Web application project has some problems. It is mainly configured. Some places are easier to make mistakes, mainly on the web application VSS management makes a certain description.

The first is the version of VSS, VSS in Visual Studio 6 is version 6.0, .NET can't use this version, use VSS6.0c, this is an improved version of 6.0, but in vs.net Chinese Enterprise Architecture Edition There is no such VSS6.0c in the 7 discs. It is said that in English, I don't know the English version, and I will find a VSS6.0c on the Internet.

The installation is relatively simple. Now there is a netsetup.exe file in the server directory C: / Program Files / VSS, and share this directory, share this directory, and share this directory. The .exe file is installed.

Create a source code management database

At the server, you must first create a source code management database to store the server version of your development team shared file.

Create a shared network folder for the source code management database

In the Source Management Server, open the Windows Explorer, create a new folder called TEST. Right click on "Test" and click Properties. In the Test Properties dialog box, click the Share tab, and then click Share this folder. You can now create a source code management database in shared Test.

Create a source code management database

In the server, click the "Start" button, point to "Programs", point to "Microsoft Visual SourceSafe", and then click Visual SourceSafe 6.0 Admin. In the "Tools" menu of the Visual SourceSafe Administrator dialog, click Create Database. In the "Create New VSS Database IN" box, find the source code management database for the "TEST" directory Visual Studio .NET established above and has been set successfully.

Then add the user, it is the staff of the development team to assign an account, and later open this database to be authenticated.

Establish web application project

For example, your web application is ready to build in D: / Web, first create a web in IIS, point to this directory, and you specify the port 90 to this web, your URL of your web application is: http: // localhost : 90. Ok, this web is the initial place where your project is. Selecting a web access method To select a web access method, we have to select a file sharing method, such a way to make full functionality of the VSS source management, better than FrontPage. Open VS.NET, on the Tools menu, click Options. In the Options dialog box, click the Projects folder, and then click Web Settings. Under Preferred Access Method, click File Share (file sharing). Now we have to create a VS.NET web project file on this web - new-project, select the Visual C # item on the left, and select the ASP.NetWeb application on the right. In the location, you point to your web URL: http: // localhost: 90, this will create a web application on your web, as shown: Add a web project to the source code management in Solution Explorer (Solution Explorer, right-click the solution node, then click Add Solution To Source Control (add the solution to source management). Provide a database location according to the requirements of the source code management provider (which database you want to add this web application), and user login information. We add this Web project to the database built above. Figure:

After the database is selected, it will be prompted that the storage structure in the database in the database is prompted to prompt the solution of this scenario in the database (the solution is a unit of high-level units, one solution can include multiple items) Any items in .NET must include in a solution, if you do not specify a solution, you will give you a solution that is the same as this project, such as this project, the project name is loaclhost, vs.net automatically Added a solution called LocalHost), we build a Test_Solution directory listing solution, fill in Test_Solution in Project, and press the CREATE button to create a Test_Solution directory under the root of the database. Figure:

In the root solution directory, type the name of the project folder, which will contain the master copy of the web project file. Figure:

OK, your Web is added to the VSS database TEST.

Once your web project enters the VSS database, the original http: // localhost: 90 this location is no longer important, you can discard it, because all the information enters the database, all team members will Opening this project is a copy of the work in this database, and then work on your local copy, the server is the master copy. As long as the team members have established a local working copy from the database, as long as they open this project locally in the local Web project. Working copy is interacting with the master copy by checking in. Establishing a copy of the WEB project enters the VSS database, under the management of VSS, all members of the development team need to obtain a local working copy of the WEB project master replica from this VSS database. To ensure that your own machine is installed with IIS, because the copy of the WEB to establish the web is required to support, this work copy will be a local web to provide you with your machine to provide debugging on your own machine. The ability of this web project. Selecting the web access method as previously described, selecting a file sharing on the File menu, click Source Control, and then click Open from Source Control (Open from source management). You will prompt you to enter the corresponding source code management database, we have to find the Test database created on the server, press the Browse button, display the VSS database you know this unit in the "Open SourceSafe Database" dialog box, Test The library is not listed here, let's click the "browse" button, go to the server, the shared TEST directory we previously established TEST database, select the srcsafe.ini file in this directory, open, give this database a name "TEST", this contains the Test database of our web project to be introduced to the VSS of this unit, open this database. After opening the database, the system will allow you to choose this web project solution in your local storage path, as shown:

Note that the solution is selected. About the solution, we have discussed in front of the solution, where you can put it anywhere, when the work copy is established, it is from this time Solution to open your work copy to work.

OK, Next, here will choose a copy of your local URL, which generally selects a subdirectories under the Local default web, such as this project, copy the copy: http: // localhost / test, as shown

Everything is big.

转载请注明原文地址:https://www.9cbs.com/read-29378.html

New Post(0)