Advertisement

04.08.2008 at 10:35AM PDT, ID: 23305547
[x]
Attachment Details

App.config from "referenced" projects

Asked by Rejojohny in Microsoft Visual Basic.Net, .NET, C# Programming Language

Tags: Microsoft, VS 2005

Just needed some clarity on this

I have a 2 projects - Project A and Project B (class library windows projects)
Project B is referenced in Project A
Both projects has app.config files

Now the problem
A value in appsettings of ProjectB is not accessible using ConfigurationManager.AppSettings. Note that the code that is trying to access this value is writen in a class within project B itself. When I debug, I notice that "ConfigurationManager.AppSettings" returns only the keys from project A.

The reason why I have this is because I wanted my Project B to be independent of project A settings. Project B is used by multiple projects and I wanted the flexibility of the the other projects to have the facility to set some parameters depending on the requirements.

Is there a way to say which config file to be used in such scenarios or am should I be using some other code to access appsetting from project B. Start Free Trial
 
Keywords: App.config from "referenced" proje…
 
Loading Advertisement...
 
[+][-]04.08.2008 at 12:39PM PDT, ID: 21308803

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.08.2008 at 12:44PM PDT, ID: 21308847

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.08.2008 at 06:27PM PDT, ID: 21311169

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .NET, C# Programming Language
Tags: Microsoft, VS 2005
Sign Up Now!
Solution Provided By: jk9694
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628