Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 10th, 2003, 12:32 PM
Registered User
Join Date: Jun 2003
Location: , , Sweden.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using multiple configuration files


I need to be able to change between configuration files easily. The best way I think is to use multiple links to my application which supply the filename on the command line.

I tried the following (C#):
public static void Main(string[] args)
    if (args.Length > 0)
        AppDomain.CurrentDomain.SetupInformation.ConfigurationFile = args[0];

    // Continued...
But the value of the ConfigurationFile property does not change so I look in the Help:
quote:This property cannot be changed after the AppDomain has finished its first bind.
How can I get around this?

Hoping for ideas...
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Application Configuration Files semilemon C# 2005 17 April 24th, 2007 10:27 PM
Configuration Override Files Jeff Mason Visual Studio 2005 1 March 14th, 2007 08:52 AM
Configuration files and performance ernestlambert BOOK: ASP.NET Website Programming Problem-Design-Solution 1 April 21st, 2005 11:23 AM
Configuration files hasanali00 BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 23rd, 2005 09:13 AM

All times are GMT -4. The time now is 05:27 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.