简体   繁体   English

Visual Studio 2019 Javascript XML 评论未显示

[英]Visual Studio 2019 Javascript XML Comments not showing

I just installed Visual Studio 2019 Community Version 16.9.5.我刚刚安装了 Visual Studio 2019 社区版本 16.9.5。

I created a brand new ASP.net Web-App-Project for VB.net.我为 VB.net 创建了一个全新的 ASP.net Web-App-Project。

In that project i added a new javascript-file.在那个项目中,我添加了一个新的 javascript 文件。

Now i write a javascript function with xml comments like:现在我写了一个 javascript function 和 xml 评论像:

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

Prior to VS2019 i worked with VS2013.在 VS2019 之前,我使用 VS2013。

In VS2013 when i type "test(" in VS2013 the XML-comments will show as expected like this在 VS2013 中,当我在 VS2013 中键入“test(”时,XML 注释将按预期显示,如下所示

[XML comments showing in VS2013][1] [1]: https://i.stack.imgur.com/OqBlN.jpg [在 VS2013 中显示的 XML 注释][1] [1]: https://i.stack.imgur.com/OqBlN.jpg

In VS2019 i only get this在 VS2019 我只得到这个

[XML comments NOT showing in VS2019][2] [2]: https://i.stack.imgur.com/JOK5z.jpg [在 VS2019 中未显示 XML 注释][2] [2]:https://i.stack.imgur.com/JOK5z.jpg

In a vb.net file in the same project the comments show, only in JS the don't show.在同一项目中的 vb.net 文件中,注释显示,仅在 JS 中不显示。

Do i have to kind of enable the XML comments for JS somewhere in the VS settings or have to install an addon?我是否必须在 VS 设置中的某处为 JS 启用 XML 注释,还是必须安装插件?

i also posted the question on Microsoft Q&A and got an answer there:我还在 Microsoft Q&A 上发布了这个问题,并在那里得到了答案:

VS2019 uses a new notation for javascript xml-comments: VS2019 对 javascript xml-comments 使用新的符号:

/** This is a test. */
 function test1(a) 
 {
    
 }

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2003 JavaScript注释 - Visual studio 2003 javascript comments Visual Studio 2019 中的 aspx Javascript Illustrator - Javascript illustrator for aspx in visual studio 2019 Visual Studio 2010 Javascript注释停止工作 - Visual Studio 2010 Javascript comments stopped working Visual Studio中的JavaScript-闭合样式注释 - JavaScript in Visual Studio - Closure style comments 无法使用Visual Studio 2017或2019调试浏览器JavaScript - Unable to debug browser JavaScript with Visual Studio 2017 or 2019 Visual Studio 2019 的 React Redux 项目模板,JavaScript 问题 - React Redux Project template by Visual Studio 2019, JavaScript question Visual Studio 2019 Javascript - 如何引用应用程序根相对路径? - Visual Studio 2019 Javascript - how to reference application root relative path? 如何使用visual studio 2019和javascript从api获取数据? - How to get data from api using visual studio 2019 and javascript? 是否可以在Visual Studio 2019中使用TypeScript创建用于开发javascript库的项目? - Is it possible to create project for developing javascript library with TypeScript in Visual Studio 2019? 为什么在 Visual Studio 2019 中“onpaste”未被识别为有效的 javascript 事件? - Why is "onpaste" not recognized as a valid javascript event in Visual Studio 2019?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM