-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MissingMethodException System.Net.Http.SocketsHttpHandler.get_MeterFactory() with 2.1.0-beta2 on .NET 8.0 #297
Comments
I have the same issue with .Net 8 when trying to run |
@kbiasci-centrix i've been experiencing this same issue with this exact method in a .net 8 lambda. How have you worked around this? |
It is also related to a Lambda function project who suddenly started to fail locally on my side.
and the error I had was:
To fix it, I used the workaround suggested above, I have modified the project file and added the "System.Diagnostics.DiagnosticSource" nuget package:
|
I had the same issue with .net 8 lambda, my workaround is to downgrade |
None of the solutions I found on the internet did the trick for me. The only thing that worked, after debugging the source code of .Net Core was to remove MetricsFactoryHttpMessageHandlerFilter from the DI services and given that this is an internal class the only way to find it in the list of services was by name.
|
Service
OpenAI
Describe the bug
The explicit dependency on System.Diagnostic.DiagnosticSource results in System.Diagnostic.DiagnosticSource.dll being copied to build directory. When the program is started, two such dlls are loaded on my machine, one from build directory and one from system directory, and I get a MissingMethodException:
A workaround is to explicitly exclude this dependency from being copied to the build directory in my own csproj file:
This results in only the C:\Program Files\dotnet\shared\Microsoft.NETCore.App\9.0.0\System.Diagnostics.DiagnosticSource.dll being loaded and the program works fine.
Steps to reproduce
Code snippets
No response
OS
win
.NET version
8.0
Library version
2.1.0-beta2
The text was updated successfully, but these errors were encountered: