can I have one app.config for C#.NET solution with multiple projects

  • Thread starter Thread starter RK
  • Start date Start date
R

RK

Hi

I am working on C# application, where in I may require just one
app.config for the C#.NET solution with multiple windows application
projects. I know one web.config can be used for multiple projects, can
I use app.config is the same way??

thanx in advance.
RK
 
I am working on C# application, where in I may require just one
app.config for the C#.NET solution with multiple windows application
projects. I know one web.config can be used for multiple projects, can
I use app.config is the same way??

Not out of the box, completely anyway.....

You can

a) put most of your common settings into a "common.config" file, and
reference that from all your project .config files, by means of:

<appSettings file="common.config">
......
</appSettings>

or

b) You can use a third-party or custom-made config class, which allows
you to specify what .config file to load. Search e.g.
www.codeproject.com for samples - there are quite a few out there!


Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Back
Top