Tuesday, October 25, 2011

.Net using 2.0 dll in 4.0

Using a dll compiled in 2.0 in a 4.0 project and your into trouble.
You will get the following error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

The fix:
In your App.Config file add following at the end but before </configuration >
<startup uselegacyv2runtimeactivationpolicy="true" >
    <supportedruntime version="v4.0" >
    <requiredruntime version="v4.0.20506" >
  </requiredruntime >
</supportedruntime >
</startup >

No comments:

MySQL to MariaDB

 Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...