如何向 .vssettings 文件添加描述

发布于 2024-12-23 18:06:41 字数 66 浏览 1 评论 0原文

我正在尝试将描述标签添加到 vssettings 文件中,以便可以将我正在使用的各种 vssettings 文件分开。

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蛮可爱 2024-12-30 18:06:41

如果供个人使用或者您可以接受非本地化字符串,只需添加 DisplayNameDescription 元素以及其中的文本:

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

如果您想要本地化字符串或加载它们来自属于包的资源文件,可以指定 ResourceIDResourcePackage 元素。 (此代码段来自 General.vssettings,它包含在 Visual Studio 2010 中,不过我也使用自己的 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>
    ...

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>
    ...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文