Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6776625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:03:05+00:00 2026-05-26T16:03:05+00:00

I’m looking for a best practice for managing configuration on a project with multiple

  • 0

I’m looking for a best practice for managing configuration on a project with multiple class libraries. I’m looking for maintainability and ease of implementation.

Let’s assume a simple example: A console project with 2 class libraries. Each class library need their own configuration settings, and there are some settings that are common to several.

Class Library 1

  • CL1Setting
  • GlobalSetting

Class Library 2

  • CL2Setting
  • GlobalSetting

A first approach would be to create all the necessary settings on the main project:

  • GlobalSetting
  • CL1Setting
  • CL2Setting

But this present several problems:

  • It can get cluttered fast if there are lots of settings.
  • It is not easy to maintain: How to know which settings are needed for each library?
  • It can create naming conflicts. What if CL1Setting and CL2Setting would have the same name?

An ideal solution for me (although I’m afraid not possible) would be having custom library settings in separate files, or at least different sections. Something like this:

<configuration>
  <appSettings>
    <add key="globalSetting" value="cl1Global"/>
  </appSettings>
  <appSettings file="CL1.config" >
    <add key="cl1setting" value="cl1setting1"/>
  </appSettings>
  <appSettings file="CL2.config">
    <add key="cl2setting" value="cl2setting2"/>
  </appSettings>
</configuration>

Any suggestions?

EDIT

As Ken Henderson suggests, config sections are another approach. However, although with their own advantages, they require coding, so I don’t find it ideal though. (This will probably end up being the best option though)

EDIT 2

joseph.ferris suggestion to look at Configuration Section Designer on CodePlex (csd.codeplex.com) was good. I found further problems, reported here (in case some is interested) http://csd.codeplex.com/discussions/278354

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:03:06+00:00Added an answer on May 26, 2026 at 4:03 pm

    I think what you are looking for is a custom configuration section instead of appSettings. This is commonly used by 3rd party libraries (log4net is the first that comes to mind) to provide a way to configure their settings via your app/web config file. Note that this also provides the basis for how MS creates their configuration sections.

    I’ve successfully used this in several different projects including one that included the ability to add new implementations of algorithms to an analysis program.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I would like to count the length of a string with PHP. The string
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.