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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:45:09+00:00 2026-05-17T18:45:09+00:00

When creating a Visual Studio Add-In, how can you utilise an app.config for the

  • 0

When creating a Visual Studio Add-In, how can you utilise an app.config for the add-in. If I add one to the project and deploy it then when the Add-In runs and I programmatically try to access it via the ConfigurationManager.AppSettings its not picking up the config file for the add-in.
Am I doing something wrong or is there another means to access file based configuration settings for an add-in?

  • 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-17T18:45:09+00:00Added an answer on May 17, 2026 at 6:45 pm

    ConfigurationManager.AppSettings picks up the configuration file for the AppDomain you are loaded into. That config file is typically the one associated with the entry point executable. In your case, you don’t control the entry point executable nor the AppDomain you run in so you can’t use ConfigurationManager.AppSettings.

    You question basically boils down to “How can I have a config file associated with a DLL?” (C# Dll config file). You need to do two things:

    1. Add an Application Configuration File item to your project and make sure you deploy it to the same folder as your DLL.
    2. Access the config file from your DLL using code like this:

       string pluginAssemblyPath = Assembly.GetExecutingAssembly().Location;
       Configuration configuration = ConfigurationManager.OpenExeConfiguration(pluginAssemblyPath);
       string someValue = configuration.AppSettings.Settings["SomeKey"].Value;
      

    That will definitely work for regular DLLs that are not loaded using shadow copy. I’m not sure how VS loads its plugins. If you run into problems, let me know and I can post a work around for DLLs that get loaded via shadow copy.

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

Sidebar

Related Questions

I'm creating a web project for one of my uni modules using Visual studio
I'm creating a visual studio add in that adds files to the current project
I currently use visual studio 2008 for creating projects that can run on windows.
I am creating a Visual Studio Add-inn, i need to add new c# windows
I'm creating an add-in for Visual Studio 2008 that will allow me to switch
So, I'm creating an ATL project in visual studio 2008 using the wizard (recommended
I'm new to creating installers using Visual Studio, and was wondering about the Global
The issue is simple really. Instead of creating folders in Visual Studio, I create
In Visual Studio 2008 (and others) when creating a .NET or silverlight application if
In Visual Studio 2010, while creating new projects, we may select target version to

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.