|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Saving appSettings when using file=<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings file="External.config" > </appSettings> </configuration> And External.config contains all my settings, e.g. <?xml version="1.0" encoding="utf-8" ?> <appSettings> <add key="setup WebType" value="IIS" /> <add key="setup UseEPG" value="Y" /> </appSettings> The trouble is, when I update some settings and do a Configuration.Save() the settings are written back to the app.config and not External.config. Is this a bug, design feature, or is there a setting to alter this behaviour? Using .NET 2 Thanks, John Hi,
The better approach would be to use Application Settings (see .net help topics). -- Show quoteMiha Markic [MVP C#, INETA Country Leader for Slovenia] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "deangelj" <deangelj@usergroups.nospam> wrote in message news:38081252-76DD-499B-A214-514A28CCB897@microsoft.com... >I have an app.config that looks like this: > > <?xml version="1.0" encoding="utf-8" ?> > <configuration> > <appSettings > file="External.config" > > </appSettings> > </configuration> > > And External.config contains all my settings, e.g. > > <?xml version="1.0" encoding="utf-8" ?> > <appSettings> > <add key="setup WebType" value="IIS" /> > <add key="setup UseEPG" value="Y" /> > </appSettings> > > The trouble is, when I update some settings and do a Configuration.Save() > the settings are written back to the app.config and not External.config. > Is > this a bug, design feature, or is there a setting to alter this behaviour? > Using .NET 2 > > Thanks, > John Hi Miha,
Not sure how this would help. I'm using the file= syntax so I can share the config file between 3 different apps that I'm shipping. I can embed the settings in specific config files per app but then I need to update all 3. How does Application Settings help me in this case? thanks, John Show quote "Miha Markic [MVP C#]" wrote: > Hi, > > The better approach would be to use Application Settings (see .net help > topics). > |
|||||||||||||||||||||||