[dba-VB] VS2005: Storing application settings

Gustav Brock Gustav at cactus.dk
Thu Feb 28 11:02:08 CST 2008


Hi Charlotte

It is the app.config xml file for application settings like Connection strings and so on:

  C:\...\Visual Studio 2005\Projects\<project>\<project>\app.config

It holds the entries from the menu Project, <project> Properties pane, tab Settings.

Nothing wrong with XML files. It's just that it seems that this file is for VS's use, so don't tamper with it.

If you reference System.Configuration you can easily read from it via code, and methods exists for editing and saving values for _users_, however nothing can be saved for the _application_:

  http://geekswithblogs.net/akraus1/articles/64871.aspx

/gustav

>>> cfoust at infostatsystems.com 28-02-2008 17:01 >>>
Are you talking about settings for Visual Studio or settings for an
application?  We use XML files for storing application settings (not VS
settings), Gustav.  I don't know why you characterize it as clumsy, and
we don't "attack" any xml files.  

Charlotte Foust 

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com 
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, February 27, 2008 6:19 AM
To: dba-vb at databaseadvisors.com 
Subject: [dba-VB] VS2005: Storing application settings

Hi all

How do you store application settings?

I've noticed the nice pane with the tab "Settings" for manually doing
this, but it is read-only from code.
Of course you can step down and attack the xml file storing the data,
but I find that a bit clumsy.

/gustav






More information about the dba-VB mailing list