【问题标题】:How do URLHelp and Keyword elements work in the definition of the Visual Studio code snippet?URLHelp 和 Keyword 元素如何在 Visual Studio 代码片段的定义中起作用?
【发布时间】:2014-05-09 03:48:28
【问题描述】:

当 Visual Studio 2010 SP1 中的 C# 代码的 sn-p 使用 URLHelpKeyword 成员定义时,url 和关键字不会显示在屏幕上的任何位置:

  • 当调用 sn-p 时
  • 当按Tab键后按F1自动补全sn-p(网址中没有关键字/没有URLHelp地址)
  • 在代码片段管理器中

所以问题是,这两个成员是如何工作的,或者我做错了什么? MSDN

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Author>xyz</Author>
      <Description>This is the description of the xyz snippet.</Description>
      <HelpUrl>www.microsoft.com</HelpUrl>
      <Keywords>
        <Keyword>dhcp</Keyword>
      </Keywords>
      <Shortcut>xyz</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>Cucumber title of the snippet.</Title>
    </Header>
    <Snippet>
      <Code Language="CSharp">
        <![CDATA[Hello world from xyz.]]>
      </Code> 
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

【问题讨论】:

    标签: c# visual-studio-2010 code-snippets


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2020-11-24
      • 2020-06-28
      • 1970-01-01
      • 1970-01-01
      • 2011-11-08
      • 1970-01-01
      • 2020-09-07
      • 1970-01-01
      相关资源
      最近更新 更多