locked
VS Settings: XML vs Registry RRS feed

  • Question

  • Hi forum,

    in my VSPackage I save user settings through multiple DialogPages. Where are these settings persited? Only in the current loaded XML settings file? Or in the registry, too?

    I found registry keys concerning my custom package, but I can't completly explain the mechanism to myself. After reading many MSDN pages I'm as confused as before. Maybe someone can help me out.

    Thx & bye

    Twainsoft


    The Visual Studio Settings-Switcher! Visit http://visualstudiogallery.msdn.microsoft.com/a79072f7-3109-44a0-95c0-9c50e729d6a3


    • Edited by Twainsoft Monday, February 20, 2012 10:02 PM
    Monday, February 20, 2012 9:56 PM

Answers

  • Hi Twainsoft,
    I think you can refer to the following links:
    QUOTE :
    “A VSPackage may define one or more settings categories, which are groups of state variables that persist when a user chooses the Import/Export Settings command on the Tools menu. To enable this persistence, you use the settings APIs in the Visual Studio SDK.”
    “Custom Settings Points are created in a registry entry in the following location: HKLM\Software\Microsoft\VisualStudio\<Version>\UserSettings\<CSPName>, where <CSPName> is the name of the Custom Settings Point the VSPackage supports and <Version> is the version of Visual Studio,”
    Persisting Settings: http://msdn.microsoft.com/en-us/library/bb166231.aspx
    http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivssettingswriter.aspx

    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Twainsoft Tuesday, February 28, 2012 9:36 PM
    Wednesday, February 22, 2012 7:28 AM

All replies

  • Hi Twainsoft,
    I think you can refer to the following links:
    QUOTE :
    “A VSPackage may define one or more settings categories, which are groups of state variables that persist when a user chooses the Import/Export Settings command on the Tools menu. To enable this persistence, you use the settings APIs in the Visual Studio SDK.”
    “Custom Settings Points are created in a registry entry in the following location: HKLM\Software\Microsoft\VisualStudio\<Version>\UserSettings\<CSPName>, where <CSPName> is the name of the Custom Settings Point the VSPackage supports and <Version> is the version of Visual Studio,”
    Persisting Settings: http://msdn.microsoft.com/en-us/library/bb166231.aspx
    http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivssettingswriter.aspx

    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Twainsoft Tuesday, February 28, 2012 9:36 PM
    Wednesday, February 22, 2012 7:28 AM
  • Hi Lucy,

    thanks for your reply.

    I found the answer: the registry is the base storage for the settings. The XML file is just the exported version.

    Bye,
    Twainsoft


    The Visual Studio Settings-Switcher! Visit http://visualstudiogallery.msdn.microsoft.com/a79072f7-3109-44a0-95c0-9c50e729d6a3

    Tuesday, February 28, 2012 9:36 PM