3

I just downloaded DropNet to try and use it. I am getting an exception when trying to do new DropNetClient:

Method not found: System.String RestSharp.RestClient.get_BaseUrl()

I searched this on Google and found that RestSharp may have introduced this error and it suggested to update to 105 for RestSharp but that did not solve things.

Is this a known error and how do I correct it from happening?

Miheretab Alemu
  • 956
  • 2
  • 20
  • 43
  • I have exactly the same error. Even after updating my dropnet nuget package from 1.9.6 to 1.9.12 I do not have seen this issue reported or fixed yet on github https://github.com/DropNet/DropNet – JP Hellemons Feb 11 '15 at 13:36
  • 1
    since 23 november 2014, baseurl is required https://github.com/restsharp/RestSharp/issues/606 – JP Hellemons Feb 11 '15 at 15:23
  • the official website of restsharp lists only version 103 http://restsharp.org/ as latest. I hope that they will update their nuget a.s.a.p. and dropnet might be updated too. – JP Hellemons Feb 11 '15 at 16:00
  • DropNet is now compatible with RestSharp 105.0.1 starting from version 1.9.20 https://www.nuget.org/packages/DropNet/ – Guido Preite Mar 15 '15 at 04:45

1 Answers1

2

This is due to a change in RestSharp that converted the BaseUrl property from a string to a URI.

DropNet needs to update their references & rebuild in order to support 105. This is the change that broke them... https://github.com/restsharp/RestSharp/commit/b15ee7f60b695e0578b6def7a3e1279b62d6fccd

From https://github.com/restsharp/RestSharp/releases/tag/105.0:

New Features/Improvements

  • Converted the BaseUrl to be a URI rather than a string (potential breaking change)
  • Updated the SimpleJson package to the latest version (potential breaking change)
  • Converted the use of tabs to spaces
  • Added support for the DeserializeAs attribute on XML Added ability to deserialize into structs
  • Added additional methods on RestRequest
    • IRestRequest.AddJsonBody
    • IRestRequest.AddXmlBody
    • IRestRequest.AddQueryParameter
  • Added support for multi-part form request to allow both a request body and files

Bug Fixes

Fixed potential Null Reference Exceptions on the parameters in RestClient (ToString usage)

If you get Nuget package http://www.nuget.org/packages/RestSharp/104.5.0, then you should be okay...

jt000
  • 3,196
  • 1
  • 18
  • 36