①打开C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config目录,找到machine.config文件新增

<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite"  type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/>如下所示:

	<system.data>
		<DbProviderFactories>
			<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
			<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite"  type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/>
		</DbProviderFactories>
	</system.data>
②登陆官方网址 下载Sqlite  .NET Framework 4.0版本如下图所示:


③下载完成后安装,打开C:\Program Files\System.Data.SQLite\2010\bin,复制System.Data.SQLite.dll和SQLite.Interop.dll到codesmith安装目录,如C:\Program Files (x86)\CodeSmith\v7.0\bin,然后重启codesmith7,正常使用



本文转载:CSDN博客