1、出現(xiàn)問題原因
1)System.Data.SQLite 尚未安裝在您的計(jì)算機(jī)上
2)System.Data.SQLite 尚未正確配置
2、下載并安裝System.Data.Sqlite
【注意】CodeSmith Generator 被編譯為 AnyCPU。這意味著當(dāng)您在Visual Studio外部啟動Generator時,Generator將作為64位進(jìn)程運(yùn)行。如果從 Visual Studio(32 位進(jìn)程)中生成,則 CodeSmith 生成器庫將作為 32 位進(jìn)程運(yùn)行。
了解這一點(diǎn)非常重要,因?yàn)樗鼪Q定了在運(yùn)行時解析哪些架構(gòu)提供程序依賴項(xiàng)。
1)第一步是確保下載并安裝最新的 .NET Framework 4.0 版本的
下載地址:system.data.sqlite
① 如果您運(yùn)行的是 64 位版本的 Windows,請同時安裝 32 位和 64 位版本;
②?如果在此處安裝舊版System.Data.Sqlite?,則可以跳過以下配置步驟。舊版本通過將條目添加到您的計(jì)算機(jī).config來配置自身
3、配置System.Data.Sqlite
1)更新machine.config文件,將SQLite提供程序添加到DbProviderFactories元素:
<system.data>
<DbProviderFactories>
<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>
2).NET Framework 4.0 machine.config 可以在這里找到:
- %windir%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
- %windir%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
接下來,您需要將通過 System.Data.SQLite 安裝程序安裝的 64 位或 32 位 SQLite 程序集復(fù)制到?CodeSmith Generators?bin 文件夾。此 bin 文件夾可以在您安裝 CodeSmith 生成器的位置找到。
注意事項(xiàng):
① 如果您使用的是64位窗口,則應(yīng)復(fù)制64位SQLite程序集;
② 若遇到“你沒有權(quán)限在此位置中保存文件”,可參考鏈接你沒有權(quán)限在此位置中保存文件(win10親自測試)
③ 關(guān)于需要拷貝的文件到CodeSmith Generators?bin文件夾,這個鏈接有說明CodeSmith連接SQLite配置
4、參考鏈接
?① 官方解答
② 下載文件
③ 修改配置文章來源:http://www.zghlxwxcb.cn/news/detail-484235.html
④ 拷貝DLL文章來源地址http://www.zghlxwxcb.cn/news/detail-484235.html
以上就是【CodeSmith】The System.Data.SQLite library is not installed on this computer,不能使用SQLite解決辦法的介紹,做此記錄,如有幫助,歡迎點(diǎn)贊關(guān)注收藏!
到了這里,關(guān)于【CodeSmith】The System.Data.SQLite library is not installed on this computer,不能使用SQLite解決辦法的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!