LightningChart部署到Windows11某些电脑,无法启动问题
问题经过注册表排查、SDK排查,均没有解决问题。
在可以运行的电脑上,全盘搜索LightningChat、Arction(厂家名称)比对,终于发现一个temp目录下的Arction.DirectX_32目录以及下边俩个dll:D3DCompiler_43.dll、d3dx11_43.dll,删除了就启动不了。
解决方案就是增加文件监测,完美解决:
/// <summary> ///检查Arction.DirectX_32文件是否存在 /// </summary> private void CheckDllFile() { try { string currentPath = System.AppDomain.CurrentDomain.BaseDirectory; string localAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); string directoryPath = Path.Combine(localAppDataPath, @"Temp\Arction.DirectX_32"); //if (!Directory.Exists(directoryPath)) { Directory.CreateDirectory(directoryPath); string filePath = directoryPath + @"\D3DCompiler_43.dll"; string filePath2 = directoryPath + @"\d3dx11_43.dll"; if (!File.Exists(filePath)) { File.Copy(currentPath + @"D3DCompiler_43.dll", filePath); } if (!File.Exists(filePath2)) { File.Copy(currentPath + @"d3dx11_43.dll", filePath2); } } } catch (Exception ex) { } }
技术娴熟,稳得一匹。

浙公网安备 33010602011771号