By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,564 Members | 834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,564 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>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
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.