嵌入式单声道&x2B;app.config 我在一个C++程序中嵌入了MNO,并加载了一个DLL,需要一个App.CONFIG。我遇到了这种错误,有人知道如何使用嵌入式mono发布*.config吗

嵌入式单声道&x2B;app.config 我在一个C++程序中嵌入了MNO,并加载了一个DLL,需要一个App.CONFIG。我遇到了这种错误,有人知道如何使用嵌入式mono发布*.config吗,mono,Mono,堆栈跟踪: System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.ArgumentException: The 'ExeConfigFilename' argument cannot be null. at System.Configuration.ExeConfigurationHost.CheckFileMap (Conf

堆栈跟踪:

System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.ArgumentException: The 'ExeConfigFilename' argument cannot be null.
  at System.Configuration.ExeConfigurationHost.CheckFileMap (ConfigurationUserLevel level, System.Configuration.ExeConfigurationFileMap map) [0x00000] in <filename unknown>:0 
  at System.Configuration.ExeConfigurationHost.InitForConfiguration (System.String& locationSubPath, System.String& configPath, System.String& locationConfigPath, IInternalConfigRoot root, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0 
  at System.C[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0 
  at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in <filename unknown>:0 
  at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in <filename unknown>:0 onfiguration.InternalConfigurationSystem.InitForConfiguration (System.String& locationConfigPath, System.String& parentConfigPath, System.String& parentLocationConfigPath) [0x00000] in <filename unknown>:0 
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in <filename unknown>:0 
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object
System.Configuration.ConfigurationErrorsException:初始化配置系统时出错。-->System.ArgumentException:“ExeConfigFilename”参数不能为null。
在:0中的System.Configuration.ExecutionConfiguration Host.CheckFileMap(配置用户级别,System.Configuration.ExecutionConfiguration文件映射)[0x00000]处
在System.Configuration.ExeConfigurationHost.InitForConfiguration(System.String&locationSubPath,System.String&configPath,System.String&locationConfigPath,IInternalConfigRoot,System.Object[]hostInitConfigurationParams)[0x00000]中:0
在0中的System.C[]hostInitConfigurationParams)[0x00000]处
在System.Configuration.ConfigurationManager.OpenExeConfigurationInternal(ConfigurationUserLevel用户级别,System.Reflection.Assembly调用_Assembly,System.String exePath)[0x00000]中:0
在:0中的System.Configuration.ClientConfigurationSystem.get_Configuration()[0x00000]处,在:0中的Configuration.InternalConfigurationSystem.InitForConfiguration(System.String&locationConfigPath,System.String&parentConfigPath,System.String&parentLocationConfigPath)[0x00000]处
在:0中的System.Configuration.Configuration..ctor(System.Configuration.InternalConfigurationSystem系统,System.String位置子路径)[0x00000]处
在System.Configuration.InternalConfigurationFactory.Create(System.Type类型ConfigHost,System.Object
自我回答:你不能(从2013年4月30日起)。为了启用此行为,我必须更改mono的框架源mono/mcs/class/corlib/system/appdomain.cs:

public AppDomainSetup SetupInformation {
    get {
        return SetupInformationNoCopy; // newline
        //  AppDomainSetup setup = getSetup (); //old
        //  return new AppDomainSetup (setup); //old
    }
}