Running into System.MethodAccessException #4693
Replies: 1 comment
-
I was able to resolve this by upgrading to the latest pre-release |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using this file as an example to be able to emit metrics and logs via the otel endpoit exporter. (https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/examples/AspNetCore/Program.cs#L156).
I updated all my nuget packages to be able to send logs to an endpoint and that works now - however this call (which was working before the nuget updates) fails now :
Here is the error I am getting:
Unhandled exception. System.MethodAccessException: Attempt by method 'Microsoft.Extensions.DependencyInjection.OpenTelemetryServicesExtensions.AddOpenTelemetry(Microsoft.Extensions.DependencyInjection.IServiceCollection)' to access method 'OpenTelemetry.Internal.Guard.ThrowIfNull(System.Object, System.String)' failed.
at Microsoft.Extensions.DependencyInjection.OpenTelemetryServicesExtensions.AddOpenTelemetry(IServiceCollection services)
Any pointers or suggestions? This only started happening when I updated my nuget packages -
Beta Was this translation helpful? Give feedback.
All reactions