I need to be able to change between configuration files easily. The best way I think is to use multiple links to my application which supply the config filename on the command line.
I tried the following code:
public static void Main(string args)
if (args.Length > 0)
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile = args;
But the value of the ConfigurationFile
property did not change so I looked in the Help:
quote:This property cannot be changed after the AppDomain has finished its first bind.
Why is that and how can I get around it?
Hoping for ideas...