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