简体   繁体   English

get_baseUrl RestSharp错误

[英]get_baseUrl RestSharp error

I just downloaded DropNet to try and use it. 我刚刚下载了DropNet来尝试使用它。 I am getting an exception when trying to do new DropNetClient : 我在尝试创建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. 我在Google上搜索过这个,发现RestSharp可能已经引入了这个错误,并建议将RestSharp更新为105,但这并没有解决问题。

Is this a known error and how do I correct it from happening? 这是一个已知的错误,我该如何纠正它?

This is due to a change in RestSharp that converted the BaseUrl property from a string to a URI. 这是因为RestSharp中的一个更改将BaseUrl属性从字符串转换为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 DropNet需要更新他们的引用并重建才能支持105.这就是破坏他们的变化... https://github.com/restsharp/RestSharp/commit/b15ee7f60b695e0578b6def7a3e1279b62d6fccd

From https://github.com/restsharp/RestSharp/releases/tag/105.0 : 来自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) 将BaseUrl转换为URI而不是字符串(潜在的破坏性更改)
  • Updated the SimpleJson package to the latest version (potential breaking change) 将SimpleJson软件包更新到最新版本(潜在的重大变化)
  • Converted the use of tabs to spaces 将制表符的使用转换为空格
  • Added support for the DeserializeAs attribute on XML Added ability to deserialize into structs 在XML上添加了对DeserializeAs属性的支持添加了反序列化为结构的功能
  • Added additional methods on RestRequest 在RestRequest上添加了其他方法
    • IRestRequest.AddJsonBody IRestRequest.AddJsonBody
    • IRestRequest.AddXmlBody IRestRequest.AddXmlBody
    • IRestRequest.AddQueryParameter IRestRequest.AddQueryParameter
  • Added support for multi-part form request to allow both a request body and files 添加了对多部分表单请求的支持,以允许请求正文和文件

Bug Fixes Bug修复

Fixed potential Null Reference Exceptions on the parameters in RestClient (ToString usage) 修复了RestClient中参数的潜在空引用异常(ToString用法)

If you get Nuget package http://www.nuget.org/packages/RestSharp/104.5.0 , then you should be okay... 如果你得到Nuget包http://www.nuget.org/packages/RestSharp/104.5.0 ,那么你应该没问题......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM