HELP ! multiple configuration files!

L

lobrys

Hello

Here is my question :

I have a vb.net appli (Dotnet 1.1).
I have a config file that contains personnal settings
(myApplication.exe.config)
I also have a another config file ( anotherSettings.config ) based in the
same structure of a normal configuration file. It contains global settings.

The goal for me, is to overload these 2 files in one file, and use it, in my
application.

Is there a simple way to do that?

Thanks!!!!!!!!!!
bye!
syl
 
R

Richard Grimes [MVP]

lobrys said:
I have a vb.net appli (Dotnet 1.1).
I have a config file that contains personnal settings
(myApplication.exe.config)
I also have a another config file ( anotherSettings.config ) based in
the same structure of a normal configuration file. It contains global
settings.
The goal for me, is to overload these 2 files in one file, and use
it, in my application.

Is there a simple way to do that?

You can do anything you like as long as your settings are only for your
classes. Configuration file settings that are used by the framework
library classes, ie anything mentioned under

http://msdn.microsoft.com/library/e...ameworkConfigurationFileSchema.asp?frame=true

can only be in the application configuration file
(myApplication.exe.config).

Your question is basically: can you merge two XML files? Yes you can,
but don't ask me for the details of how to do it ;-)
microsoft.public.dotnet.xml would be a better place to ask that.

Richard
 
L

lobrys

Thanks for your response...

You're right, i need to search merging XML files.....

bye
syl
 
M

Martin Robins

In ASP.NET web.config documentation there is a section on "including"
further configuration files into the web.config as links to external files.
Since both Windows Forms and ASP use the System.Configuration namespace to
read the .config files, it suggests that you may be able to achieve the same
in app.config as you can in web.config.

Never tried it myself, but ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top