12 February 2015


I have upgraded a class library project in my solution to .NET Framework 4.0. But after the upgrade there was an error as below:


Could not load file or assembly 'some_DLL_Name' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'Xxxxx_DLL' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.


This errors happens when the DotNet framework version is using older version than the one used to build that assembly. 

So you have to change compilation framework version same as DLL compilation version.

Web-based Asp.net IIS Setting to change version:


So just check version of every assembly reference and correct accordingly as solution of the problem.

cool

0 comments :

Post a Comment