© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago
Mango

How to resolve this exception

System.TypeInitializationException: The type initializer for 'Azure.Core.ClientOptions' threw an exception.
---> System.IO.FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    at Azure.Core.ClientOptions..ctor(ClientOptions clientOptions, DiagnosticsOptions diagnostics)
    at Azure.Core.DefaultClientOptions..ctor()
    at Azure.Core.ClientOptions..cctor()
    --- End of inner exception stack trace ---
    at Azure.Identity.TokenCredentialOptions..ctor()
    at Core.Communication.MsGraphEmailService.d__6.MoveNext()
System.TypeInitializationException: The type initializer for 'Azure.Core.ClientOptions' threw an exception.
---> System.IO.FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    at Azure.Core.ClientOptions..ctor(ClientOptions clientOptions, DiagnosticsOptions diagnostics)
    at Azure.Core.DefaultClientOptions..ctor()
    at Azure.Core.ClientOptions..cctor()
    --- End of inner exception stack trace ---
    at Azure.Identity.TokenCredentialOptions..ctor()
    at Core.Communication.MsGraphEmailService.d__6.MoveNext()


I don’t know what version to redirect to and I don’t see this assembly listed as a transient package or otherwise in the executing or calling assembly.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to resolve this unmanaged memory leak?
C#CC# / help
5mo ago
does anyone know how to resolve this?
C#CC# / help
2y ago
How to skip exception
C#CC# / help
2y ago