Maybe not as elegant of a solution as Eric's, but I just create multiple web.config and app.config files, one for each environment I deploy to. I use the <copy> task and a <property> to select the correct *.config file and copy it to the needed location.
Might be a little more maintenance if you need to add settings because you have to add it to multiple files, but it works for me. Jason >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of >Brian Beaudet >Sent: Thursday, April 08, 2004 4:20 PM >To: 'Nant Users' >Subject: RE: [Nant-users] Config Files? > >Eric, > >I've started using custom XML files for configuration purposes >instead of the <appSettings> section in the normal .config >files. How would your program be useful in that scenario? > >The only things I leave in the App.config file (or Web.config) >would be configuration settings for log4net or some other >third party tool. > >Thanks, >Brian > >> -----Original Message----- >> From: [EMAIL PROTECTED] [mailto:nant-users- >> [EMAIL PROTECTED] On Behalf Of Eric Fetzer >> Sent: Thursday, April 08, 2004 5:14 PM >> To: [EMAIL PROTECTED]; Nant Users >> Subject: Re: [Nant-users] Config Files? >> >> I deploy to several different environments with settings in my >> app.config as well as web.config files that vary (such as paths to a >> file share or database connection string). So I wrote a C# program >> that based on an XPath (mapping in the xml file), substitutes the >> appropriate value. I call this from the build file for each of the >> systems I will deploy to and create an NSIS installation >file for each >> (with appropriate config(S) contained therein). I've posted this >> program before. If you want it, I can post again. It's commented >> pretty well as to how to use it. >> >> Eric >> >> >> --- Brian Beaudet <[EMAIL PROTECTED]> wrote: >> > I hate to think I'm posting the same old questions but >I've searched >> > and haven't found much out there on this topic. What do others do >> > to create a programname.exe.config file from their App.config. >> > Is it as simple as >> > a <copy> task? That's what I'm doing now. I don't keep >much in the >> > App.config file but my application still whines if it's not there. >> > >> > >> > >> > Brian M. Beaudet >> > >> > Director, Research & Development >> > >> > EfficiencyLab, LLC >> > >> > www.efficiencylab.com >> > >> > >> > >> > >> >> >> __________________________________ >> Do you Yahoo!? >> Yahoo! Small Business $15K Web Design Giveaway >> http://promotions.yahoo.com/design_giveaway/ >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux >> tutorial presented by Daniel Robbins, President and CEO of GenToo >> technologies. Learn everything from fundamentals to system >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >> _______________________________________________ >> Nant-users mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/nant-users > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials Free >Linux tutorial presented by Daniel Robbins, President and CEO >of GenToo technologies. Learn everything from fundamentals to >system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Nant-users mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/nant-users > ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users