469,358 Members | 1,628 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

Share configurable application settings between projects in a vsnet solution

I have a vs2005 solution containing about 5 projects, three of which
have their own .settings files.

When I deploy the application, I want all the settings to be in one
place - configurable - presumably in an app.config file where I can
edit them. The settings will be used by a windows service,
filewatcher, database access application.

How do I achieve this?

As a workaround, I have created an additional project which contains a
single static class with static property accessors pointing to values
from an internal settings file.
I've consolidated all the settings information from the other projects
into that one project. I then referenced that project from all the
others and used it's settings via the static class properties.

Does that sound like the right approach?

I just had the idea that I might be missing something. I've downloaded
the Configuration Application Block and am investigating that,
thinking that it might help me. As usual, there's bucketloads of
general information on the application block, but nothing succinct, so
I'm going to have to do the hard yards until I find something
pertinent.

Any advice would be much appreciated.

Jun 7 '07 #1
3 1920

I just had the idea that I might be missing something. I've downloaded
the Configuration Application Block and am investigating that,
thinking that it might help me. As usual, there's bucketloads of
general information on the application block, but nothing succinct, so
I'm going to have to do the hard yards until I find something
pertinent.
That's where you need to go. Why re-invent the wheel? It has it all with
examples and everything about working with App.config in just the download
for .Net 2.0. All you have to do is reference the App Block Dll(s) which are
part of VS 2005 and the .NET 2.0 Framework, or with VS 2003 and with .Net
1.1 Framework, you have to download and install CAB and add reference to the
right Dll(s) in your project.

Jun 7 '07 #2
Unfortunately it looks like there's no Configuration Application Block
in the latest offering of the Enterprise Library.
Back to the drawing board.

Jun 7 '07 #3

"Meteor" <tb******@hotmail.comwrote in message
news:11*********************@i13g2000prf.googlegro ups.com...
Unfortunately it looks like there's no Configuration Application Block
in the latest offering of the Enterprise Library.
Back to the drawing board.
Yes, there is no Enterprise Library for Framework 2.0. All of it has been
moved to the System.Configuration namespace.

http://www.dotnetfun.com/articles/fr...onManager.aspx

Every last bit as far as Configuration Application Block, is in
ConfigurationManager. I have used the Configuration Application Block
Enterprise solutions on Framework 1.1 and the ConfigurationManager on
Framework 2.0. They are the same solutions.

All you're going to get on the download for Config App Block for Framework
2.0 are documentation, examples and demos for VB and C#.NET on how to use
ConfigurationManager.

Jun 7 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by AARON PECORARO | last post: by
9 posts views Thread by Andrew Shitov | last post: by
reply views Thread by 1Cajun | last post: by
reply views Thread by =?Utf-8?B?U2ltb25EZXY=?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.