I have a sample on my site [1] that allows you to parse the <appSettings>
area of arbitrary configuration files, as well as parse arbitrary key/value
sections other than <appSettings>.

-Mike
http://staff.develop.com/woodring
http://www.develop.com/devresources

[1] http://staff.develop.com/woodring/dotnet/#ConfigFileReader

----- Original Message -----
From: "Mark Griffiths" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 02, 2002 6:25 AM
Subject: [DOTNET] Loading an alternate configuration file


> I am writing some unit tests, using NUnit, for an ASP.NET application.
The
> ASP.NET application uses some settings from the <appSettings> element of
> Web.config.  My problem is that the NUnitGUI.exe process does not get
> associated with the Web.config, and I don't want to create a
> NUnitGUI.exe.config file since NUnit is used in more than one project.
>
> At the moment I am hardcoding defaults for each setting, but this is not
> ideal.  Does anybody know how I can direct the framework to load a
> configuration file from code?  I couldn't find anything in
> System.Configuration (apart from the undocumented ConfigXmlDocument
class).
>
> Thanks for any suggestions
> Mark
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to