【问题标题】:Visual Studio 2019 Javascript XML Comments not showingVisual Studio 2019 Javascript XML 注释未显示
【发布时间】:2021-08-20 11:00:29
【问题描述】:

我刚刚安装了 Visual Studio 2019 社区版本 16.9.5。

我为 VB.net 创建了一个全新的 ASP.net Web-App-Project。

在那个项目中,我添加了一个新的 javascript 文件。

现在我用 xml cmets 编写一个 javascript 函数,例如:

function test(a) {
    /// <summary>
    /// This is a test
    /// </summary>
    /// <param name="a">Test a</param>  
}

在 VS2019 之前,我使用的是 VS2013。

在 VS2013 中,当我在 VS2013 中键入“test(”时,XML-cmets 将按预期显示如下

[在 VS2013 中显示的 XML cmets][1] [1]:https://i.stack.imgur.com/OqBlN.jpg

在 VS2019 中我只得到这个

[XML cmets 未在 VS2019 中显示][2] [2]:https://i.stack.imgur.com/JOK5z.jpg

在同一项目的 vb.net 文件中,cmets 显示,仅在 JS 中不显示。

我必须在 VS 设置中的某处为 JS 启用 XML cmets 还是必须安装插件?

【问题讨论】:

    标签: javascript visual-studio comments intellisense


    【解决方案1】:

    我还在微软问答上发布了这个问题并在那里得到了答案:

    VS2019 为 javascript xml-cmets 使用了新的表示法:

    /** This is a test. */
     function test1(a) 
     {
        
     }
    
    /** 
      *  This is a test. 
      *  @param {string} a - the parameter.
      */
     function test2(a) 
     {
        
     }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-07
      • 1970-01-01
      • 1970-01-01
      • 2021-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-01
      相关资源
      最近更新 更多