0

I m using the sharpsvn library and I want to do a switch but it keeps giving me following error:

"This argument is not a valid path. A Uri was specified."

I checked if the path was oke and the paths are good any Idea whats wrong?

var configpath2 = "http://website.com/svn/CMS/trunk/Configuration";

teststring = localpath + @"\trunk\Configuration\CMS";
svnClient.Switch(new Uri(teststring).ToString(), new SvnUriTarget(new Uri(configpath2)));
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Trustos
  • 41
  • 3
  • 11

1 Answers1

2

Some related links:

  1. http://docs.sharpsvn.net/current/html/M_SharpSvn_SvnClient_Switch_1.htm
  2. http://docs.sharpsvn.net/current/html/Overload_SharpSvn_SvnClient_Switch.htm

As i understood by reading the above mentioned pages, is that you have to pass string as the first argument of Switch. Try this one:

svnClient.Switch(teststring, new SvnUriTarget(new Uri(configpath2)));
Shaharyar
  • 12,254
  • 4
  • 46
  • 66
  • I tried that doesn`t work it stays the same message. A working example would be nice but can't find one online. – Trustos Apr 11 '13 at 14:01
  • 1
    @Trustos Perhaps have a look at the [SwitchTests](http://sharpsvn.open.collab.net/svn/sharpsvn/trunk/src/SharpSvn.Tests/Commands/SwitchTests.cs) for some working examples (username guest, no password). Switch expects two parameters, the first is the path to the working copy that should be switched. The second is the Uri of the new location to switch to. So not only should the first parameter be of type `System.String`, it should be a valid path on your computer. – Sander Rijken May 14 '13 at 18:07
  • I come to a page where I am supposed to login. – Anders Lindén Feb 03 '22 at 15:06