电子生成器,打包后无法加载文件或程序集

时间:2018-06-28 11:47:18

标签: electron electron-builder

我有一个电子应用程序,在开发模式下运行时可以正常工作。但是,当我用电子生成器打包该应用程序时,它开始缺少.dll s:

Error
Filename: 
"file:///C:\Users\[user]\AppData\Local\Programs\electron-react-redux-boilerplate\resources\app.asar\node_modules\dynamicsnode\src\bin\DynamicsNode.dll"
FusionLog:
"WRN: Assembly binding logging is turned OFF.
↵To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
↵Note: There is some performance penalty associated with assembly bind failure logging.
↵To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
↵"
HResult: -2147024894
HelpLink: null
InnerException: null
Message:
"Could not load file or assembly 'file:///C:\Users\[user]\AppData\Local\Programs\electron-react-redux-boilerplate\resources\app.asar\node_modules\dynamicsnode\src\bin\DynamicsNode.dll' or one of its dependencies. The system cannot find the file specified."
Source: "mscorlib"
StackTrace:
"   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
↵   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
↵   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
↵   at System.Reflection.Assembly.UnsafeLoadFrom(String assemblyFile)
↵   at ClrFunc.Initialize(FunctionCallbackInfo<v8::Value>* info)"
TargetSite: Object
message:
"Could not load file or assembly 'file:///C:\Users\[user]\AppData\Local\Programs\electron-react-redux-boilerplate\resources\app.asar\node_modules\dynamicsnode\src\bin\DynamicsNode.dll' or one of its dependencies. The system cannot find the file specified."
name: "System.IO.FileNotFoundException"

我已经检查了路径,错误是指向file:///C:\Users\[user]\AppData\Local\Programs\electron-react-redux-boilerplate\resources\app.asar\node_modules\dynamicsnode\src\bin\DynamicsNode.dll)的,并且.dll在文件系统上。

在我的electron-builder.json中,我有"asar": true

我缺少某些设置吗?

0 个答案:

没有答案