I have 2 projects in my solution.
How do I reference the app.config in one project from the other?
Printable View
I have 2 projects in my solution.
How do I reference the app.config in one project from the other?
IINM, you can add a file attribute to your existing config file, like so:
<appSettings file="C:\Path\abc.config">
Ok. Had a play this morning and this is basically what I want to do.
I have an app that is going to be deployed over a number of sites. there are 7 settings in the app config that need to be changed for each site (connection strings, local email account, email server etc).
After running the deployment project I want the users to be able to run the config program. Seeing as how the configurationsettings.appsettings("KeyName") is a read only collection, I need to know how the config exe can write to the app.config file?
The config file is XML so you would use an XmlDocument object to edit it. The link below gives an example of almost exactly what you want to do.
http://msdn.microsoft.com/library/de...albasicnet.asp
Brilliant site that one. Told me everything I needed to know
Cheers