|
-
Oct 20th, 2005, 11:57 AM
#1
Thread Starter
Lively Member
[RESOLVED] Referencing app.config from another solution
I have 2 projects in my solution.
How do I reference the app.config in one project from the other?
-
Oct 20th, 2005, 12:21 PM
#2
Re: Referencing app.config from another solution
IINM, you can add a file attribute to your existing config file, like so:
<appSettings file="C:\Path\abc.config">
-
Oct 21st, 2005, 02:40 AM
#3
Thread Starter
Lively Member
Re: Referencing app.config from another solution
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?
-
Oct 21st, 2005, 02:47 AM
#4
Re: Referencing app.config from another solution
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
-
Nov 16th, 2005, 10:12 AM
#5
Thread Starter
Lively Member
Re: Referencing app.config from another solution
Brilliant site that one. Told me everything I needed to know
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|