I really need help with the following:
It's common in app development to create numerous projects under one
solution that as a whole combine to become your final application. For
example I have a solution that has four subprojects - 3 class libraries and
1 windows forms app.
Q - Some of these projects - both class library and win form application
require access to a config file. In one of the projects - the one that
supports data access I use the line below to access a custom config section:
ChaosDataConfiguration config =
(ChaosDataConfiguration)ConfigurationSettings.GetC onfig("TheChaosLibraries/DataProviderSettings");
The problem I'm having is I don't know if this is going to work. Should the
App.config file be placed under the data projects directory, or is there
some way to create a single config file at the root of the solution and have
all projects access that?
Any help would be greatfully received.
Thanks all
I do not think that one config file can be used by more then one
application. Remember, the config file has to be named the same as
program
for it to load.
"Simon" <sh856531@microsofts_free_email_service.com> wrote in message
news:uK*************@TK2MSFTNGP09.phx.gbl...Hi all,
When you make a solution that contains numerous projects - where should
youput the configuration file that should be used for the application?
Example:
An application called MyApp has 4 projects each contained within their
own
subdirectories. Each project outputs its dll to its own bin directory.
The folder structure is:
MyApp
- MyProject 1
- MyProject 2
- MyProject 3
- MyProject 4
Where should I put the config file so that all the projects access it?
Is it even possible to have a single config file shared amongst multiple
projects? I'm sure it is - I just can't find any details on how to do it.
If anyone has any advice on this I would appreciate it very much
Thanks in advance everyone
Simon