Project1 is the MainProject, so I want to do all work on Project1's app.config. I have a collection in Project1 config which I want to access from Project2.
Please let me know how to do this.
Project1 is the MainProject, so I want to do all work on Project1's app.config. I have a collection in Project1 config which I want to access from Project2.
Please let me know how to do this.
This is not advisable because you will have the other project rely on Project 1's configuration.
If you do want to do it you can do something like this:
//Reference Project 1 in Project 2 then create a public class
// create a public property that stores configuration you want.
// read the configuration with the ConfigurationManager
Public Class Datalayer
Public connetionString =
ConfigurationManager.ConnectionStrings("connection").ConnectionString
Now you can access that property in the referenced project. Again this is not ideal and i didn't test it.