Method not found: 'Void Microsoft.Rest.ServiceClient`1..ctor(System.Net.Http.DelegatingHandler[])'.
See original GitHub issueHi,
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:
- Created 6 years ago
- Reactions:3
- Comments:20 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@angeldinev – yeah, sorry about that. There is a missing
.ConfigureAwait(false)
in.13
that is fixed in.14
…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.