2013-04-13 26 views
2

我有一個嵌入式單聲道在一個C++程序並加載了一個需要一個app.config的DLL。我遇到這種錯誤,有人有一個想法如何運輸*。配置與嵌入式單聲道?嵌入式單聲道+應用程序配置

堆棧跟蹤:

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 

回答

1

自我回答:你不能(截至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 
    } 
} 
相關問題