none
Settings file -v- app.config ?

    Question

  • This might be a dumb question, but what is the difference between a Settings.settings file and app.config ? When should I use one over the other ?

    The help file tells me how to use each one, but doesn't seem to explain why to use each one in preference to the other.

    It seems daft to me to store config data in two separate files - more hassles at install time updating multiple files rather than just one.

    Tuesday, October 10, 2006 7:47 AM

All replies

  • Basically, App.config is an “older” mechanism to define and read simple key/value combinations. MySettings is a newer version of this mechanism which allows you to do the same, but also allows the developer to define and update objects and their properties. Also using a nifty interface, during designtime.

    MySettings(.settings) allow you to create and access values that are persisted between application execution sessions. Think in terms like: user preferences, (data) connection strings, control properties etc.

    Handy note for Settings: the User scope is read/write during runtime, whilst the Application scope of a setting is read-only during runtime.

    Read more about Settings in this article by Matt Stoecker.
    Read more about Settings vs App.config in this article by Alois Kraus.

    Tuesday, October 10, 2006 8:52 AM
  •  SickDotNet wrote:

    Basically, App.config is an “older” mechanism to define and read simple key/value combinations. MySettings is a newer version of this mechanism which allows you to do the same, but also allows the developer to define and update objects and their properties. Also using a nifty interface, during designtime.

    MySettings(.settings) allow you to create and access values that are persisted between application execution sessions. Think in terms like: user preferences, (data) connection strings, control properties etc.

    Handy note for Settings: the User scope is read/write during runtime, whilst the Application scope of a setting is read-only during runtime.

    Read more about Settings in this article by Matt Stoecker.
    Read more about Settings vs App.config in this article by Alois Kraus.



    Hi,

    Unfortunately the links are not available anymore.
     But your explanation is enough to understand the basic concept.

    <!--[if !supportEmptyParas]--> <!--[endif]-->

    They better put some explanation like this on MSDN. It always hard to understand why should I use this feature instead of another one using MSDN.

    <!--[if !supportEmptyParas]--> <!--[endif]-->

    Thanks a lot.


    Monday, April 14, 2008 5:36 PM
  • Link for Matt Stoecker article is broken, but here's the new one

    Wednesday, June 22, 2011 1:24 PM