electron中调用了c#的dll,但是在打包后打开exe文件,报错如下:
__proto__
:
Object
FileName
:
"file:///D:\projects\electron-vue\WiFiDockManager_2\outputs\Wi-Fi_Dock_Manager-win32-x64\resources\app\dist\electron\static\DockPipeClient_3.dll"
FusionLog
:
"警告: 程序集绑定日志记录被关闭。
↵要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。
↵注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
↵要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
↵"
HResult
:
-2147024894
HelpLink
:
null
InnerException
:
null
Message
:
"未能加载文件或程序集“file:///D:\projects\electron-vue\WiFiDockManager_2\outputs\Wi-Fi_Dock_Manager-win32-x64\resources\app\dist\electron\static\DockPipeClient_3.dll”或它的某一个依赖项。系统找不到指定的文件。"
Source
:
"mscorlib"
StackTrace
:
" 在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection

本文介绍了解决Electron项目中调用C# DLL后,在打包过程中出现DLL未找到的问题。通过调整webpack配置,成功将DLL文件包含进最终的打包结果。
最低0.47元/天 解锁文章
1567

被折叠的 条评论
为什么被折叠?



