How can Visual Studio.net use CVS management source code
Visual Studio.net has good integration with Visual SourceSafe belonging to Microsoft, so many people use Visual SourceSafe as their source management tool when using Visual Studio.Net to develop. But what do Visual Studio.NET do when the project needs to use CVS as the source code management tool? This article will be described with a shallow description, teach you how to configure CVS to combine with Visual Studio.NET seamless.
1, the software required
CvsNT: http://www.cvsnt.com (Select CVSNT V2.0.51B as a server)
IGLOO: http://www.jalindi.com/igloo/ http://www.devhood.com/tools/tool_details.aspx?tool_id=491 (Visual Studio.net plugin, used to access CVS), IGLOO installation successfully The default Source Control for Visual Studio.NET will use CVS.
2, configure the CVS server
If you use existing CVS, you can skip this step.
After the CVSNT is installed, there will be a menu item "CVSNT / Service Control Panel" in the start menu, and there will be "CVS for NT" icon in the control panel. Click on one of them to open the following window:
(Figure 1)
Add the specified directory as the code storage in the Repositories tab. If the specified directory is still not a storage library approved by CVSNT, CVSNT initializes the directory. As shown in Figure 2:
(Figure II)
If you need to check if the Temporary Directory under the Advanced tag is the correct value. If the specified directory does not exist, the temporary folder cannot be established when the Visual Studio.NET is operated. As shown in Figure 3:
(Figure 3)
3. Establish a Visual Studio.net project and add to CVS
Compared to SourceSafe, the repository in CVS is equivalent to the Databaseafe in the SourceSafe, the Module in the CVS corresponds to the client's directory structure. Therefore, Visual Studio.net is saved in CVS in the module.
A) Establish a new Visual Studio.NET project (arbitrary), the Solution view is as follows:
(Figure 4)
At this time, VS.NET has a solution called CVSSolution and a project called TestCVS in CVSSolution (PROJECT).
B) Add CVSSolution to CVS
Right-click the Solution view and select "Add Solution To Source Control ..." in the pop-up menu, the following dialog box is displayed:
(Figure 5)
CVS remote access generally uses the PServer protocol, the format of the cvsroot is as follows:
: pserver: Username: Pasword @ hostname: repository
The repository here sealls the MyFirstRepository shown in Figure 2, click the CHECK button to test the server connection, and the CVS login dialog box will pop up, prompt to enter the password (of course, the password can also be specified in cvsroot): (Figure 6)
At this time, if the connection is successful, the following information dialog box will pop up, otherwise the error message will pop up:
(Figure 7)
There are two cvs module and vendor in Module, and CVS Module is generally consistent with the name of the object (here Solution) that is added to the CVS. Vendor can be modified according to the preference.
If the specified module already exists, click on Connect, otherwise click Create to create a new module. Because we are new to CVS, we should establish new module at this time. If Module Cvssolution is established, it will prompt the project TestCVS to add CVS information:
(Figure 8)
Compared with Figure 5. At this time, the localPath changes to the directory where the TestCVS project is located. CVS Module also defaults to cvssolution / testcvs, indicating that this Module is under the Module of CVSSolution. Click Create to create a corresponding module for the directory where TestCVS is located. The file in the Solution of Solution will be in Check IN to CVS after CVSSolution / TestCVS creation.
At this point, Visual Studio.NET project is formally coupled to CVS. You can test whether CHECK IN and CHECK OUT for the project file test CVS is working properly.
For newly added projects in the solution (Solution) can also be added to CVS for reference.
4, conclusion
Using CVS in Visual Studio.NET is not different from SourceSafe, just on the configuration and user interface, IGLOO will display the output of the CVS in the Output window when the file compare is performed. on.
This article is just a primer used by Visual Studio.net and CVS, more techniques need to be excavated.