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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:38:47+00:00 2026-05-31T19:38:47+00:00

I have a project being ported to work on Linux under Mono. The project

  • 0

I have a project being ported to work on Linux under Mono. The project includes multiple C# libraries, which have their own user-scoped, Application Settings (generated automatically via VS2008). In the end, the project will run on .NET in Windows and Mono in Ubuntu 10.04.

When operating in Windows, Application Settings are stored in a single user.config file with separate Configuration Sections for each library:

<configuration>
  <configSections>
    <sectionGroup name="userSettings" type="UserSettingsGroup ...>
      <section name="LibFoo.Properties.Settings" type="ClientSettingsSection ... />
      <section name="LibBar.Properties.Settings" type="ClientSettingsSection ... />
    </sectionGroup>
  </configSections>
  <userSettings>
    <LibFoo.Properties.Settings>
      <setting name="strFoo" serializeAs="String">
        <value>An example string value.</value>
      </setting>
    </LibFoo.Properties.Settings>
    <LibBar.Properties.Settings>
      <setting name="strBar" serializeAs="String">
        <value>An example string value.</value>
      </setting>
    </LibBar.Properties.Settings>
  </userSettings>
</configuration>

In Ubuntu, a single user.config is created, however, I find that only one section is created for whichever library first calls Properties.Settings.Save(), and all libraries use that same section:

<configuration>
  <configSections>
    <sectionGroup name="userSettings" type="UserSettingsGroup ... >
      <section name="LibFoo.Properties.Settings" type="ClientSettingsSection ... />
    </sectionGroup>
  </configSections>
  <userSettings>
    <LibFoo.Properties.Settings>
      <setting name="strFoo" serializeAs="String">
        <value>An example string value.</value>
      </setting>
      <setting name="strBar" serializeAs="String">
        <value>An example string value.</value>
      </setting>
    </LibFoo.Properties.Settings>
  </userSettings>
</configuration>

This becomes particularly troubling when settings among the libraries have the same name.

Is this a bug in Mono, or do I need to change something for Mono to generate separate sections for my library’s settings?

  • Ubuntu v10.04
  • mono-runtime v2.10.8
  • Visual Studio 2008 Professional
  • 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-31T19:38:48+00:00Added an answer on May 31, 2026 at 7:38 pm

    To avoid the same config name problem, you can try to put the configuration settings in the config file for each DLL. Your config file needs to have the name “MyDLL.dll.config” (assuming your DLL is named “MyDLL.dll”) and be in the same folder as the DLL.

    (never tested under mono)

    To write in dll’s config files:

    You can make an Extension method “Save”, and in this method use reflection to retrieve the Assembly name (Calling assembly, not current assembly), then use SaveAs to save the configuration. This way you have a method to save in dll config files.

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

Sidebar

Related Questions

I have C++ project (VS2005) which includes header file with version number in #define
In my MVC project I have a chart being generated on my view as
I have a web application project (wap) that is successfully being deployed to a
I have a solution that is being referenced by a MSBuild project. In the
I have a c++ project being developed in QT. The problem I'm running in
I have a web application project being developed in VS2010 targetting Framework 4.0. I
I'm currently writing my own shell as a project for a class, and have
My background is Linux and traditional makefiles. I have a project where the makefile
I have a Java project being tested with JUnit (mix of Junit 3 and
I have a Java Project in which I am writing a simple JUNIT test

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.