用sqlit 数据库 在docker中 跑报错。 返回
marcelo 发布于2025/8/8
用sqlit 数据库 在docker中 跑报错。
热忱回答(4)
-
marcelo VIP0
2025/8/8程序初始化出错:System.Exception: An error occurred during the initialize RS.ContainerService.Modularity.OnPreApplicationInitializationModuleLifecycleContributor phase of the module RS.BaseRepository.RSRepositoryModule, RS.BaseRepository, Version=1.4.4.0, Culture=neutral, PublicKeyToken=null: 中文提示 : 连接数据库过程中发生错误,检查服务器是否正常连接字符串是否正确,错误信息:The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception..
English Message : Connection open error . The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. . See the inner exception for details.
---> SqlSugar.SqlSugarException: 中文提示 : 连接数据库过程中发生错误,检查服务器是否正常连接字符串是否正确,错误信息:The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception..
English Message : Connection open error . The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
0 回复 -
fate sta VIP0
2025/8/8(1) 独立安装 Microsoft.Data.Sqlite每个类都统一最新版本(先卸载sqlsugarcore)
(2) 如是发布Linux找不到文件报这个错 ( 发布不要用裁剪 )
(2.1)用户解决方案 https://www.donet5.com/Ask/9/23442
(2.2)用较高版本 Linux版本自带装好sqlite3的 比如:华为欧拉openEuler 22.03 (LTS-SP3)
不要用停止维护的Linux版本,如果用了就比较麻烦需要看 2.1方案补上缺失文件
0 回复 -
fate sta VIP0
2025/8/8修改的是程序端服务器
0 回复 -
fate sta VIP0
2025/8/8或者NUGET安装
SQLitePCLRaw.bundle_e_sqlite3 这个DLL在发布一下看看
0 回复