Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

C# Programming

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.

> 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.

-----------------------------------------------Reply-----------------------------------------------
Unfortunately it looks like there's no Configuration Application Block
in the latest offering of the Enterprise Library.
Back to the drawing board.

-----------------------------------------------Reply-----------------------------------------------

"Meteor" <tbush@hotmail.com> wrote in message

news:1181196052.614108.76440@i13g2000prf.googlegroups.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/framework/2.0/WhatsNew20Configurati...

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.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc