You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.OData.Edm.Vocabularies.V1.CoreVocabularyModel' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) ---> System.BadImageFormatException: Cannot load a reference assembly for execution.
#2933
Open
kkattamudi-ms opened this issue
Apr 13, 2024
· 0 comments
Our Service is not running due to a dll loading issue with the Odata library ."Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.OData.Edm.Vocabularies.V1.CoreVocabularyModel' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) ---> System.BadImageFormatException: Cannot load a reference assembly for execution. "
Assemblies affected
OData .Net lib 7.5*
Reproduce steps
May be using the OData.Net library with combination of 4.7.2 framework and using the reflection package 4.1.20 or nuget package
Expected result
*It should load the system.reflection package from global assembly cache as 4.0 version exists in GAC
Actual result
It is not able to load the assembly from GAC .
Additional detail
*I dont see any redirects with the Odata code . I am not sure if it needs depedency on system.reflection package or not . If it is required what it should be ?
The text was updated successfully, but these errors were encountered:
Our Service is not running due to a dll loading issue with the Odata library ."Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.OData.Edm.Vocabularies.V1.CoreVocabularyModel' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) ---> System.BadImageFormatException: Cannot load a reference assembly for execution. "
Assemblies affected
Reproduce steps
May be using the OData.Net library with combination of 4.7.2 framework and using the reflection package 4.1.20 or nuget package
Expected result
*It should load the system.reflection package from global assembly cache as 4.0 version exists in GAC
Actual result
It is not able to load the assembly from GAC .
Additional detail
*I dont see any redirects with the Odata code . I am not sure if it needs depedency on system.reflection package or not . If it is required what it should be ?
The text was updated successfully, but these errors were encountered: