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 368027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:47:05+00:00 2026-05-12T13:47:05+00:00

I am developing a .NET 3.5 Windows Forms app. I have two projects, the

  • 0

I am developing a .NET 3.5 Windows Forms app. I have two projects, the UI and a Library.

UI uses strongly typed settings that are stored, as usually, in the app.config file. I read them using UI.Properties.Settings class (generated by Visual Studio).

Library uses its own strongly typed Settings (the Settings.settings file that is dumped into Library.config file).

At runtime, Library settings will not reload from the Library.config file. Only UI.config file is read by the runtime. So I am stuck with default settings in Library assembly, and cannot provide values after deployment.

To summarize: for an application assembly that is not the main executable, the settings are not read at assembly load time.

I know I can use ConfigurationManager.AppSettings[“value”] and this will read from the default app config file (UI.config) but what can I do if I want strongly typed settings (read with Properties.Settings class)?

Calling Library.Properties.Settings.Default.Reload() won’t do it.

Thanks.

  • 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-12T13:47:05+00:00Added an answer on May 12, 2026 at 1:47 pm

    What you need to do is merge your library config sections to app.connfig. Merging config files is done by first adding elements inside the <configSections> config element, to identity the config section and then by adding the config elements inside the configuration element.

    Example of merging config files:

    App config:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
            <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
                <section name="CA3.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
            </sectionGroup>
        </configSections>
        <userSettings>
            <CA3.Settings>
                <setting name="Setting" serializeAs="String">
                    <value>2</value>
                </setting>
            </CA3.Settings>
        </userSettings>
    </configuration>
    

    Library config:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
            <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
                <section name="CA3.Library" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
            </sectionGroup>
        </configSections>
        <userSettings>
            <CA3.Library>
                <setting name="Setting" serializeAs="String">
                    <value>1</value>
                </setting>
            </CA3.Library>
        </userSettings>
    </configuration>
    

    Merged app.config containing both library and app configuration.

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
            <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
                <section name="CA3.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
                <section name="CA3.Library" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
            </sectionGroup>
        </configSections>
        <userSettings>
            <CA3.Settings>
                <setting name="Setting" serializeAs="String">
                    <value>2</value>
                </setting>
            </CA3.Settings>
            <CA3.Library>
                <setting name="Setting" serializeAs="String">
                    <value>1</value>
                </setting>
            </CA3.Library>
        </userSettings>
    </configuration>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 225k
  • Answers 225k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can also avoid the error by using Post.objects.filter(blog__author='John') May 13, 2026 at 12:55 am
  • Editorial Team
    Editorial Team added an answer See the MSDN documentation for TypeBuilder.DefineMethodOverride, which includes an example… May 13, 2026 at 12:55 am
  • Editorial Team
    Editorial Team added an answer IE has a problem with background colors for the TR… May 13, 2026 at 12:55 am

Related Questions

I am developing a forms app (not web) for Windows Mobile, using .NET CF
I am developing an internally-facing application that needs to automatically authenticate users via Windows
I am developing a small business application which uses Sqlserver 2005 database. Platform: .Net
I am currently building a Windows Service with C# and I just can't figure

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.