question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Method not found: 'Void Microsoft.Rest.ServiceClient`1..ctor(System.Net.Http.DelegatingHandler[])'.

See original GitHub issue

Hi,

I’m developing a WPF application that uses an autorest generated client to communicate with an API. It was working correctly until today (VS2017)

I’m getting the following error: Method not found: ‘Void Microsoft.Rest.ServiceClient`1…ctor(System.Net.Http.DelegatingHandler[])’.

I tried the following:

  • Rebuild and Clean the Project
  • Run autorest --reset and regenerate the client
  • Restart visual studio
  • Update to the lastest version of Microsoft.Rest.ClientRuntime (2.3.10)
  • Search in my hard drive and erase all old versios of ClientRuntime

None of them worked, I’m just calling the constructor like this (ProjectAPI is the name of my API generated class): ProjectAPI api = new ProjectAPI (new Uri("http://localhost"));

I searched in the repository but there are no issues related to this, anyone can help?

Thanks a lot.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fearthecowboycommented, Sep 21, 2018

@angeldinev – yeah, sorry about that. There is a missing .ConfigureAwait(false) in .13 that is fixed in .14

1reaction
mikanygcommented, Sep 19, 2018

hmm, sounds like I need to go fix all my client packages to depend on 2.3.12 instead 😕

The magic sauce to remove the error mentioned in this issue would be the following assemblyBinding added to app.config or web.config: <dependentAssembly><assemblyIdentity name="System.Net.Http" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /> </dependentAssembly>

I think System.Net.Http versioning has been a pain for both Microsoft and developers since it was shipped out of band.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Method not found: 'Void Microsoft.Rest.ServiceClient`1..ctor(System ...
Net.Http.DelegatingHandler[])'. I tried the following: Rebuild and Clean the Project; Run autorest --reset and regenerate the client; Restart visual studio ...
Read more >
Library version conflicts in .NET: System.Net.Http
Method not found : 'Void Microsoft.Rest.ServiceClient`1..ctor( System.Net.Http.DelegatingHandler[])'. which I solved by copying the right ...
Read more >
ServiceClient<T> Constructor (Microsoft.Rest)
Rest.ServiceClient .ServiceClient in the Microsoft.Rest namespace. ... protected ServiceClient (params System.Net.Http.DelegatingHandler[] handlers);
Read more >
Method not found: 'Void System.Net.Http.Headers ... - MSDN
So the MVC4 web pages are showing up - but I try to get to the APIs, I get the error message "Method...
Read more >
ComputerVisionClient Constructors - Microsoft Learn
public ComputerVisionClient (Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers); new Microsoft.Azure.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found