1

In my solution, we do have 2 projects, one of those contains App.config. I used the namespace of other project in my project. What happens is, the other project's class is using App.config node is not giving me the value of the node. How can I access the same? Below is my tree structure of the solution-

MySolution
-Project1
--Class1
-Project2
--Class1
--App.config

2 Answers2

0

Once you run your project, there is only one app.config that will be loaded on your application.

So in order to read the other app.config, you need to change it at runtime as well. I have a similar case, you can check my complete solution here:

Is it possible to use different config file on different Winform Projects at runtime?

Willy David Jr
  • 8,604
  • 6
  • 46
  • 57
0

Right click on project1 and add the existing App.config file of Project2 and add as link for project1 . App.config now added with project1.