Does mono application bundled with mkbundle use app.config?

人走茶凉 提交于 2019-12-05 01:34:30

问题


I build my application like this:

mkbundle --static -o de --deps DeviceEmulator.exe 
UnionArgParser.dll Emulators.dll NLog.dll Protocol.dll
FSharpx.Core.dll

When i run ./de on same machine application works fine. But when i copy to other machine (i use lxc container) and start i got an error:

Exception: System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. System.Configuration.ConfigurationErrorsException: Unrecognized configuration section (/home/ubuntu/tests/device/DeviceEmulator.exe.config line 3)

Addition

I found solution myself. Need to pass parameter --machine-config <path to my mono/runtime/etc/mono/4.0/machine.config> when bundle. This is solve problem with error.

来源:https://stackoverflow.com/questions/21597033/does-mono-application-bundled-with-mkbundle-use-app-config

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!