RestSharp: Method not found: 'Void RestSharp.RestRequest..ctor(System.String, RestSharp.Method)'

We are getting Method not found: 'Void RestSharp.RestRequest..ctor(System.String, RestSharp.Method)' exception in CallFire C#sharp API, which relate to RestSharp. This is when we upgrade to version 106.5.x (and now to 106.5.4).

Please help us understand the error, as the callfire is using your code for a while and it works well for year. so it seems something is broken in your code itself.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 18 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Title should be “Version 106 is not compatible with version 106.”

While at first this may sound “stupid and ugly” the fact is that to SEMVER advocates (ie. the NuGet community) this is critically important news. It means that it’s possible for FOSS Projects (NuGet Packages) A and B to be built against different binary versions of RestSharp that claim to be “version 106”, except they cannot be used side-by-side in a solution which pulls down any version of RestSharp v106.

Hmm.

@alexeyzimarev until you resolve this issue I suggest you to unlist the problematic version(s) in NuGet.org because it creates a lot of problems right now. When you do unlist it people who already have a reference will still be able to restore that particular version.

@Furtif it is not a bug. For minor versions, we guarantee signature compatibility in code. For hotfix versions, we guarantee binary signature compatibility. If you upgrade RestSharp but there is a library that has a strict dependency on a specific RestSharp version, the library provider must set the dependency version lock and it is not our responsibility.

I agree that this should have been a major release. Although we ensured that the code signature is compatible, the binary signature isn’t and the solution needs to be recompiled. If RestSharp package is updated but some package uses the old signature, it fails with this error. I will try fixing it asap.

On Wed, 17 Oct 2018 at 14:54 Turner Bass notifications@github.com wrote:

Somethings I’m wondering, is CallFire using Activator.CreateInstance() anywhere to create a RestRequest? Because if that constructor really was missing the compiler would have been able to catch that during build and this look like something went wrong at runtime.

So I can see where the CallFire Client is constructing an instance of RestRequst here https://github.com/CallFire/callfire-api-client-csharp/blob/7ddc39a558e19ed6e21eaa506c44cbfb4cf9163c/src/CallfireApiClient/RestApiClient.cs#L559-L561, though that constructor does exist.

@vmalinovskiy https://github.com/vmalinovskiy I did notice that request.RequestFormat is being assigned after the constructor on L560. There is a new constructor overload available to allow you to set the RequestFormat at the constructor. (new RestRequest(string resource, RestMethod method, DataFormat dataFormat)) Maybe try that and see if that helps?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/restsharp/RestSharp/issues/1198#issuecomment-430616302, or mute the thread https://github.com/notifications/unsubscribe-auth/ACsMVeVp2KaUY0X33M3Ilql_FQQ7ntSLks5ulyiGgaJpZM4XeHdE .

– Med vennligst hilsen / Best regards, Alexey V. Zimarev