none
Where are the Properties.Settings.Default.Color stored? RRS feed

  • Question

  • Dear All,

    I have used the Properties.Settings.settings provided by MS.

    What path and location in Hard drive are these values stored to?


    Thanks and regards,

    E-John



    • Edited by E-John Tuesday, February 27, 2018 9:45 AM Modify the question to more clear
    Tuesday, February 27, 2018 8:45 AM

Answers

  • Hi E-John,

    The Properties.Settings.settings is a config file, and its location depends on the version of windows you are using.

    If it is Win7, then the location is under:

    C:\Users\[User]\Local Settings\Application Data\Microsoft

    In my Win10, it is under:

    C:\Users\[User]\AppData\Local\WinformApplication1\WinformApplication1_Url_nhwe5rwvdai555itclbmjkqykx4y3xf2\1.0.0.0

    In fact, you can get the path programmatically:

        var path = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
        textBox1.Text = path.ToString();

    Before using the code, you need to add a reference named System.Configuration:

    Hope it helps!

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by E-John Thursday, March 1, 2018 1:18 AM
    Wednesday, February 28, 2018 1:19 AM

All replies


  • In the app config file


    Success
    Cor

    Tuesday, February 27, 2018 9:18 AM
  • User scoped settings are stored in an user.config file that is stored under the user's profile under a folder hierarchy that includes your app name and version #. They will be written to that file when you save. The default values are stored in the app.config.

    The LocalFileSetitngsProvider class provides more information.


    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, February 27, 2018 9:06 PM
    Moderator
  • Hi E-John,

    The Properties.Settings.settings is a config file, and its location depends on the version of windows you are using.

    If it is Win7, then the location is under:

    C:\Users\[User]\Local Settings\Application Data\Microsoft

    In my Win10, it is under:

    C:\Users\[User]\AppData\Local\WinformApplication1\WinformApplication1_Url_nhwe5rwvdai555itclbmjkqykx4y3xf2\1.0.0.0

    In fact, you can get the path programmatically:

        var path = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
        textBox1.Text = path.ToString();

    Before using the code, you need to add a reference named System.Configuration:

    Hope it helps!

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by E-John Thursday, March 1, 2018 1:18 AM
    Wednesday, February 28, 2018 1:19 AM
  • Hi Stanly,


    I found it by getting the path from provided snippet in your comment. Thanks for your detail explanation and helps.

    Thank you very much.


    Regards,

    E-John
    Thursday, March 1, 2018 1:31 AM