ASP. net mvc + EF framework + EasyUI permission management series (10)-VSS source code management

Source: Internet
Author: User

In the previous blog, we briefly explained the T4 template. In this blog, we started to learn about the source code management. Of course, I just mentioned these knowledge points, if you need to learn more, you can find a lot of things you need in the blog. Let's start learning the source code manager. What I want to talk about here is VSS.

1. Why source code?

(1) first, you may encounter this problem. We have been working on a project for a long time, but at the end of the project, there was a problem (which could not be solved ), at this time, we very much hope that the project will be able to return to when we can run, and we have been working on the project for a while, one day, we thought that the code we wrote was a bit problematic and could be implemented in a simpler way, at this time, we want to quickly return to the place where we want to modify or re-run, which is the role of the source code manager.

(2) Therefore, the source code we write must be well managed using a very good tool, and good rollback can be performed when there is a problem with our code, rolling back to a certain time point of a day, that is to say, all the source code of our development project must be managed. It cannot be said that it is not safe to exist on our computer, if there is a problem with our system hard drive, this is the loss of the entire project.

2. Introduction to source code Manager (VSS)

(1) The above description shows that we want to manage the source code. How can we manage the source code? Below I will draw a picture to describe it,

(2) Based on my belief that we can see how the source code manager executes and how it completes these tasks, I will introduce some things that are not written in the following.

(3) what our developers require in the source code manager is to use the check-out file and check-in file. What is the check-out file? When I want to modify this file, I need to check out the file on the server first. After the file is checked out, I can modify it. After the file is modified, it is generated successfully, when submitted to the server, it is the check-in, which is the difference between the check-out and check-in.

(4) Next I will demonstrate how to use the source code manager for the permission system we are developing. For more information, see

3. Install the source code management software VSS

(1) After the above introduction, we want to manage the source code, but how can we manage it? Of course, the first thing we think of is that we need an environment, that is, the installation of the VSS tool. First we open Visual Studio, and then click tools> Options> source code management ,:

(2) For example, we will see a drop-down box for the current source code management plug-in the source code management. If VSS is not installed, there should be only one Visual Studio Team Foundaton Server, if VSS is installed, the effect will be the same as that of me.

Install the ghost file. I will not talk about the installation steps here. It's a silly installation, after the installation is complete, close Visual Studio and restart Visual Studio. Then, you can see the following in tool> Options> Source Code Manager.

(4) After installing VSS, You must select the Microsoft Visual SourceSafe option in the current source code management plug-in the tool, next we will start to build the source code management step by step.

4. How to add a project to the source code server (VSS)

(1) How can we add my current project to the source code management server? First, right-click the solution and choose add solution to source code management (or choose File> Select Code Management> Add solution to source code management ), open:

(2) Add a wizard for source code database management, which is equivalent to adding a database, and then click Next ,:

(3) We can see two options: Connect to an existing database (Connect to an existing database ). The other is Create a new database (Create a new database). What are their differences? Next, let me talk about it a little bit: First, if we choose Connect to an existing database and click Next, we will go to another page, on the where page, we can select a source code management library on our machine. If it is a LAN, we can write the Loaction address as follows: \ 192.168.1.250 \ kencery. INI file, or we can directly click Brower to select. However, because it was the first time we used the VSS management tool, we chose to Create a new database and then click Next:

(4) It means: Where can we place the database? Click Browse and select a path (normally we can put it on disk C), and then click Next, A text box named again for the database will appear. Select default and click Next:

(5) We can see two more options. They are two available modes, the first Mode means lock-Modify-Unlock mode (that is, only one person can be modified at a time ), the second mode means copy-Modify-merge mode (multiple people can modify the file at the same time). Generally, we can select the first mode by default, click Next and click Finish. The VSS logon page is displayed when you click Finish:

(6) It shows that we have created the source code management database, and the password does not exist by default. The user name system automatically retrieves the user name of the computer, and then click OK. The following page is displayed:

(7) then, click the OK button to prompt a message indicating that the directory has not been changed and whether to create the directory. Select Yes, at this time, we submitted our current solution to the database for management. In this way, we will add our project to the source Manager.

(8) When we add our project to source code management, a lock is displayed in front of our project, if there is a small lock, it means that our current project is managed by the source code manager. At this time, you can see a lot of files under the selected folder.

 

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.