xmlvisual-studiovisual-studio-2010vssettings

How to add a description to a .vssettings file


I'm trying to add a description tag into the vssettings file so I can keep apart the various vssettings file I'm using.


Solution

  • If it's for personal use or you're okay with non-localised strings, simply add DisplayName and Description elements with the text in them:

    <UserSettings>
        <DisplayName>My Settings</DisplayName>
        <Description>The description to display.</Description>
        ...
    

    If you want localised strings or to load them from the resource file belonging to a package, there are ResourceID and ResourcePackage elements that may be specified. (This snippet comes from General.vssettings, which is included with Visual Studio 2010, though I've also tested it with resources in my own VSPackage.)

    <UserSettings>
        <Description>
            <ResourceID>#14839</ResourceID>
            <ResourcePackage>{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}</ResourcePackage>
        </Description>
        <DisplayName>
            <ResourceID>#14838</ResourceID>
            <ResourcePackage>{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}</ResourcePackage>
        </DisplayName>
        ...