unable to retrieve key App.Config
I have a class library in .NET 1.1 which uses its own app.config.
There is another application I am trying to use my assembly with, and that has its own config file entitled (applicationName.config). Mine is just "app.config".
Now, it is unable to retrieve the key from my app.config, it returns null. Any ideas whats causing the problem?
The code:
string keyValue = System.Configuration.ConfigurationSettings.AppSettings[key];
The key does exists
Re: unable to retrieve key App.Config
Is there somewhere in the DLL where the particular .config file has been specified? How does it know, of itself, to look in applicationname.config?
Re: unable to retrieve key App.Config
true, after some further researching found out that its not entirely possible, there is a workaround but not good enough for my purpose so had to create my own xml format unfortunately.
workaround was to reset the AppDomain and the config file settings to point to the new specified config file of your choice.