Click here to Skip to main content
15,902,777 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Hi everybody,

I want to write a program to check out source code from svn by C#.

Can you help me,please?
Posted
Updated 12-Aug-13 22:22pm
v2
Comments
Stephen Hewison 13-Aug-13 4:05am    
What have you tried so far? What problems have you encountered?

Google is your friend.. this is the first link for the following search:

Search Criteria:
"c# program to check out from SVN"

First Link:
svn-check-out-using-c-sharp-program[^]

It is really not that hard to try stuff yourself before posting lazy questions. At least then you would have some sample code you could post saying isn't working etc.
 
Share this answer
 
Comments
ridoy 13-Aug-13 4:54am    
+5
Add the following dll references in your project DotSvn.Client And DotSvn.Common. and than use following C# code. 


C#
 using (var client = new SvnClient())
                {
                    var repository1 = new Uri(txtURL.Text);
                    using (var client1 = new SvnClient())
                    {
                        client1.Authentication.Clear();
                        client1.Authentication.DefaultCredentials = new System.Net.NetworkCredential("username", "password");
                        client1.Authentication.SslServerTrustHandlers += delegate(object sender, SvnSslServerTrustEventArgs e)
                        {
                            e.AcceptedFailures = e.Failures;
                            e.Save = true;
                        };
                        System.Collections.ObjectModel.Collection<svnlogeventargs> logEntries;
                        var logArgs = new SvnLogArgs {Limit = 1};
                        client1.GetLog(repository1, logArgs, out logEntries);
                    }

                    var arg = new SvnCopyArgs {LogMessage = "error"};
                    var target = new SvnUriTarget(new Uri(txtURL.Text));

                    client.CheckOut(target, repositoryPath);

                }
</svnlogeventargs>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900