Download files from visual sourcesafe (VSS) Server (C #)

Source: Internet
Author: User
First, reference ssapi. dll

You only need to call Get In The vssitem class to download a file on the server to the local device. To download a specified version, you must first use the get_version method to specify the item of a specific version. Vssdatabase = new vssdatabaseclass (); try {vssdatabase. open (txtdbpath. text, txtaccount. text, txtpasswd. text);} catch {MessageBox. show ("can't login to the VSS Database"); return;} Try {vssitem = vssdatabase. get_vssitem (txtitempath. text, false); vssitem vssitemversion = vssitem. get_version (Int. parse (txtversion. text); string localpath = txtlocalpath. text; vssitemversion. get (ref localpath, 0 ); If (file. exists (txtlocalpath. Text) {MessageBox. Show ("succeed! ") ;}} Catch {MessageBox. Show (" Download failed ");} example:
Vssdatabase = new vssdatabaseclass ();
Vssdatabase. Open ("\\\\ 192.168.1.123 \\ sourcesafe \\ srcsafe. ini", "SJF", "SJF ");
Vssitem = vssdatabase. get_vssitem ("$/jobmate. sln", false );
Vssitem vssitemversion = vssitem. get_version (1 );
String S = "C :\\ jobmate. sln ";
Vssitemversion. Get (ref S, 0); 1. Microsoft provides a dynamic library called vssitem (DLL), the Help page address is http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.sourcesafe.interop.aspx
2. Third-party VSS tools
1) dynamsaft sourceanywhere for VSS
2) sourcegear's sourceoffsite

During secondary development, most of the applications can think of collecting some logs of configuration management, and then organizing relevant analysis reports based on the collected logs, then there is real-time monitoring, finding problems based on monitoring logs, and further improving the overall configuration management. # C # column

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.