Click here to Skip to main content
13,046,773 members (41,043 online)
Rate this:
Please Sign up or sign in to vote.
Hi All,
i am working on one app in which i am using SQLite connectivity for my database.while connecting to my database it is giving me below error :-
"Message = "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."
I searched on web and found below two different solutions which i have added  in my code :
1. Added in  my app.config file :
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
2. Modified project property:
"generate serialization assembly = Off"
but after doing this still i am facing same issue. Please help me out..
Posted 24-Apr-13 20:57pm
venu gopal reddy m 27-Dec-13 17:53pm

I am also having same problem with SQLite. Did you find why it is throwing the above exception? Please send me if you have found a way around.
RyanDev 27-Dec-13 20:43pm
Sergey Alexandrovich Kryukov 27-Dec-13 21:04pm
Why using assembly built to v.2.0 of the framework at all? Can't you get or build it for v.4.0?
Rate this: bad
Please Sign up or sign in to vote.

Solution 3


You should replace SQLite DLL v2.0 with SQLite DLL ver 4.0 download SQLite ver 4.0 of these links:

SQLite ver 4.0 32 bit
SQLite ver 4.0 64 bit

for getting more information please look at SQLite Org.

and I suggest to you read my article maybe it can change your solution ;-)
Build Your Own Generic Data Access Layer: Part II[^]

Best Regards.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


I found a way around this after 3-4 hours of googling. I have added the following 
<startup selegacyv2runtimeactivationpolicy="true">
  <supportedruntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />

If this doesn't solve your problem then--> In the Project References Right Click on System.Data.SQLite--> Select Properties--> Check the Run-time Version --> If it is v2.0.50727 then we know the problem.
The Problem is:- you are having 2.0 Version of SQLite DLL.
Solution is:- You can delete the System.Data.SQLite from the Project references and then download the latest version of DLL's from the following link and add the reference of the latest version DLL reference then it will work.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 28 Dec 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100