Mixed mode assembly build against version 2.0. and can not loaded in the 4

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 while tried to use SQLite.net lib of dotnet version  'v2.0.50727'  with 4.0 application.

This error occurs when your referenced projects or referenced lib is mixed mode and built upon different dotnet frame work version.

For this you have to set target framework version same for all project and if you are using some lib then it will be better to build in current dotnet version or you can add following configuration in app.config   file.

  < startup useLegacyV2RuntimeActivationPolicy="true">
    < supportedRuntime version="v4.0"/>
    < requiredRuntime version="v4.0.20506"/>

You have to change supportedRuntime and requiredRuntime  if you are facing this problem rather than version 4.0.
blog comments powered by Disqus