【问题描述】
Connection Client升级到最新版本后,无法进入正常登录页面,启动程序就弹出以下错误:
【原因分析】
通过事件查看器捕捉到以下报错信息:
应用程序: Bentley.Connect.Client.exe
Framework 版本: v4.0.30319
说明: 由于未经处理的异常,进程终止。
异常信息: System.EntryPointNotFoundException
在 System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(System.Data.SQLite.SQLiteConfigOpsEnum)
在 System.Data.SQLite.SQLite3.StaticIsInitialized()
在 System.Data.SQLite.SQLiteLog.PrivateInitialize(System.String)
在 System.Data.SQLite.SQLiteLog.Initialize(System.String)
在 System.Data.SQLite.SQLiteConnection..ctor(System.String, Boolean)
在 Bentley.Connect.Client.Database.DbManager.VerifyDatabase()
在 Bentley.Connect.Client.Database.DbManager..cctor()
异常信息: System.TypeInitializationException
在 Bentley.Connect.Client.Database.DbManager.VerifyDatabase()
在 Bentley.Connect.Client.Framework.Manager..ctor()
在 Bentley.Connect.Client.Framework.Manager.GetManager()
在 Bentley.Connect.Client.App..ctor()
在 Bentley.Connect.Client.Program.Main()
从异常信息上分析引起错误原因是托管 DLL(System.Data.SQLite.dll)和原生DLL(SQLite.Interop.dll)的文件版本不一致导致的。
我们依次对比了位于下图路径下的两个dll文件的具体版本,发现是一致的,大小为422KB,并没有发现异常。
关键信息是: 我们又从ConnectionClient崩溃后的日志中捕捉到了一个System.Data.SQLite.dll的路径:
从此路径找到的System.Data.SQLite.dll大小为373KB,版本和原生DLL(SQLite.Interop.dll)中的不一致。
也就是说,我们需要将人为设置过的(客户环境)图示路径下的System.Data.SQLite.dll替换为新版ConnectionClient程序所依赖版本的System.Data.SQLite.dll(422KB)。
【具体操作】:
注意:如果出现下图复制不了的情况,请先通过任务管理器关闭Bentley.Licensing.Service for Windows进程后再复制即可。