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
Error Explanation -
During using Sqlite Database with Csharp Applications you may suffer from this error Don't fear from it this is simple error
This problem is seen often . The main reasonof this problems is that, because of the support for side-by-side runtimes in .Net Technology , .NET framework 4.0 has changed its way of binding to older framework mixed-mode assemblies. These assemblies are those that are compiled from old C++\CLI. Currently available DirectX assemblies are mixed mode. If you see a message like this then you know you have run into the issue:
Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
SOLUTION :
Add the Following code in App.config file . App.config file will be available in Solution Explorer . If App.config is not available then you can add it by :-
- Right click on Project's folder in Solution Explorer
- Click on Add then click on New
- Now scroll and find Application Configuration file and Click ok
- Now App.config will be successfully added .
- Now make the code of your App.config file similar to the following code or the replace the <startup> tag with tag given below
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<requiredRuntime version="v4.0.20506" />
</startup> - Now All errors Will be gone and continue your code with SQlite Csharp using link below :-
How To Use Sqlite Database With Csharp
0 Comment to "Mixed mode assembly is built against version 'v2.0.50727' of the runtime"
Post a Comment