Hi
I am building a dotnet 1.1 app, in VB.net ...
I would like to have several config files corresponding to multiple
envirronment (Database, local Machine, Application, User...) and overloads
each, in order to have, by the way, one config.
So I would like to load a config file (app.config) at startup (as usual),
then overload this file with a new file (came from SQL for exemple), then
overload with a second file.....etc....
What do you think about that? is it possible?
Do i must access to each file manually (with xml methods) ? read them and
then construct one config file, and then load it?
Thanks!!!!!!
bye
syl
Piyush Thakuria - 09 May 2005 11:00 GMT
Hi,
I have tried and successfully loaded diffrent config files based on diffrent
business condition. Don't know it is the optimised solution:
Here is the code in C#
System.Configuration.ConfigXmlDocument doc = new
System.Configuration.ConfigXmlDocument();
doc.Load ("app.config");
I would convert the same in vb.net for you:
Dim doc as new System.Configuration.ConfigXmlDocument()
doc.load(app.config)
Then you have to access each node and attribute manually.
Best Regards,
Piyush Thakuria
> Hi
>
[quoted text clipped - 16 lines]
> bye
> syl
lobrys - 09 May 2005 13:46 GMT
Hello
Thanks for your response Piyush!
I dont understand your answer.....
OK for reading file, but attribute manually to what?
Thanks
bye!
syl
> Hi,
>
[quoted text clipped - 40 lines]
>> bye
>> syl
SwamiDave - 10 May 2005 13:41 GMT
We do something similar via a dll that runs as a step in our install
packages.
We create a set of configuration files (Dev, Test, QA, Production, etc.) and
then add a extra dialog to the installer that allows the User / Install to
pick the environment to which the application is being installed. Based upon
their selection, a conditional variable is set that the dll (which is invoked
as a Custom Action) uses to replace the Web.Config file in the project with
the particular <Environment.config> file.
So far it works great for us to be able to deliver a single install package
that can install our application to multiple environments based upon which
one the User / Installer selects from that additional dialog box (added via
Add Dialog).
SwamiDave
> Hello
>
[quoted text clipped - 51 lines]
> >> bye
> >> syl