Hi there, I have a solution with two projects, each project has an app.config file. Project 1 contains no settings, yet when Project 1 launches the ConfigurationManager class, it gets the config settings from the app.config file in Project 2.
How does it do that?
Thanks
Loading
Felipe RamosPosted Jun 30, 2011, 8:13 AM
Below is a fragment from the internal initializer
Jiteendra SampathiraoPosted Jun 30, 2011, 3:30 AM
As suthish said storing values in XML file... retrieve those values using code behind logic is the better approach....
paul walkerPosted Jun 30, 2011, 3:26 AM
Project 1 is the procesing module which contains the 'empty' App.Config file and the call to read parameters from the App.Config file (in Project 2) is of Output Type 'Class Library'.
Project 2, which contains the App.Config file with the actual parameters, is a testing harness used to unit test Project 1. This is awindows application.
Note that:=
The startup project is Project2 (as you would expect, it is the testing harness)
In the Solution properties, Project2 is dependent on Project 1, so the build order must be Project1, then Project 2.
Thanks
Paul
Felipe RamosPosted Jun 29, 2011, 12:28 PM
Suthish NairPosted Jun 29, 2011, 11:13 AM