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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:09:34+00:00 2026-05-12T07:09:34+00:00

I am writing a C# .NET 2.0 .dll that is a plug in to

  • 0

I am writing a C# .NET 2.0 .dll that is a plug in to a Larger application. The visual studio project for my module has a app.config file which is copied to a MyProj.dll.config along side of MyProj.dll.

The plan is that MyProj.dll.config will be edited after the .dll is deployed. I am trying to read my settings from that modified local file. I have tried pulling out the LocalFilesSettingsObject and changing it’s application name to my .dll like this:

        Properties.Settings config = Properties.Settings.Default;
        SettingsContext context = config.Context;
        SettingsPropertyCollection properties = config.Properties;
        SettingsProviderCollection providers = config.Providers;
        SettingsProvider configFile = Properties.Settings.Default.Providers["LocalFileSettingsProvider"];
        configFile.ApplicationName = Assembly.GetExecutingAssembly().GetName().Name;
        config.Initialize(context, properties, providers);
        config.Reload();

That is not working. I am struggling to wrap my head around the whole .NET Settings mess. I’d like a recipe to finish this task. I would also like a link to a clear explanation (with examples) of how settings are supposed to work in .NET 2.0

  • 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-12T07:09:34+00:00Added an answer on May 12, 2026 at 7:09 am

    You will need to load the x.dll.config (with the Configuration API) yourself. All the automatic file handling (including the .Settings) is all about machine.config/y.exe.config/user-settings.

    To open a named config file:

    • Reference System.Configuration.dll assembly.
    • Using System.Configuration
    • Create code like:

      Configuration GetDllConfiguration(Assembly targetAsm) {
        var configFile = targetAsm.Location + ".config";
        var map = new ExeConfigurationFileMap {
          ExeConfigFilename = configFile
        };
        return ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None);
      }
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im writing a .net webforms app. It has a number of classes, for example
I'm writing an .NET 3.5 web application that is using LinqToSql for the basic
Instead of writing my ASP.NET C# applications in Visual Studio, I used my favorite
I'm writing an ASP.NET MVC application and trying to use a RESX file to
I am writing a .NET library that for various reasons cannot be registered in
We're writing an asp.net web app on IIS 6 and are planning on storing
Well, after a long time writing .net programs in C# I started to feel
I am writing a .NET wrapper class for an existing native class which throws
I was writing some ASP.NET control when I came to the scenario where I
I'm writing an ASP.Net webform with some DropDownList controls on it. Then user changes

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.