ConfigurationManager.OpenExeConfiguration - loads the wrong file?
I have added multiple app.config (each with a differet name) files to a project, and set them to copy to the output directory on each build. I try and access the contents of each file using this: System.Configuration.Configuration o = ConfigurationManager.OpenExeConfiguration(@"app1.config"); The code runs, but o.HasFile ends up False, and o.FilePath ends up "app1.config.config". If I change to code: System.Configuration.Configuration o = ConfigurationManager.OpenExeConfiguration(@"app1"); Then the code bombs with "An error occurred loading a configuration file: The parameter 'exePath' is