Using the SQLite times exception in the. NET 4.0 environment
Mixed-mode assemblies are generated for the "v2.0.50727" version of the runtime, and cannot be loaded in the 4.0 runtime without additional information being configured the method that it calls is to get the database connection that was already used from the SQLite database, not at the time. is ready to set breakpoints and then single-step debugging, the result is a breakpoint can not enter the method body, and then carefully looked at the method body when found a problem, Is the existing System.Data.Sqlite this data access provider is for. NET2.0 Environment Development (the latest version is 1.0.66.0, released on April 18, 2010), and the current official has not given the latest. NET4 data access support.
Workaround:
Add a configuration item to the configuration file <supportedruntime version= "v2.0.50727"/>
As shown below:
<?xml version= "1.0" encoding= "Utf-8"?>
<configuration>
<startup uselegacyv2runtimeactivationpolicy= "true" >
<supportedruntime version= "v4.0" sku= ". netframework,version=v4.0 "/>
<supportedruntime version= "v2.0.50727"/>
</startup>
</configuration>
[VS2015]. Using the. NET2.0 assembly in a NET4.0 environment, the "mixed-mode assembly exception" occurs with the SQLite times exception