【发布时间】:2018-08-28 15:43:19
【问题描述】:
我正在使用 electron-edge-js 调用 C# DLL。
在 DLL 中,调用 App.config 文件以获取服务器连接信息。
return (ServiceDetailConfiguration)ConfigurationManager.GetSection(ServiceDetailConfiguration.ServiceDetailConfigurationConst);
在我调用dll的js文件中,我可以成功调出dll,并处理信息。也就是说,直到我点击上面的行,我得到一个空异常,因为它找不到 app.config。
我尝试了以下方法:
Load WCF app.config bindings in edge.js app
working with electron-edge-js for existing dll with app.config
运气不好。
在我的 package.json 文件中,名称是“firstelectronapp”。 当我构建文件时,我将其输出为“test.exe”
所以我尝试将这些文件放在与 test.exe 文件相同的根文件夹中,但没有成功:
- first.exe.config
- firstelectronapp.exe.config
- test.exe.config
- node.exe.config
我有什么遗漏吗?我用调用 dll 的 app.config 编写了一个快速 C# 应用程序,当单步执行它时,我可以看出问题所在。
【问题讨论】:
标签: c# node.js electron app-config edgejs