用SQLite,Enterprise的报错

要在web.config或者app.config的<configuration></configuration>加上下面两节。

上面要注册SQLite Data Provider,另外我是.netframework 4.0

<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite"/>
<add name="SQLite Data Provider" invariant="System.Data.SQLite"
description
=".Net Framework Data Provider for SQLite"
type
="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,
Version=1.0.66.0, Culture=neutral,
PublicKeyToken=db937bc2d44ff139"
/>
</DbProviderFactories>
</system.data>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>

原文地址:https://www.cnblogs.com/peteryu007/p/2117330.html