Visual Studio 2019 Javascript XML Comments not showing

olliwander123 1 Reputation point
2021-06-02T09:47:15.32+00:00

I just installed Visual Studio 2019 Community Version 16.9.5.

I created a brand new ASP.net Web-App-Project for VB.net.

In that project i added a new javascript-file.

Now i write a javascript function with xml comments like:

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

Prior to VS2019 i worked with VS2013.

In VS2013 when i type "test(" in VS2013 the XML-comments will show as expected like this

101675-xmlcomments1.jpg

In VS2019 i only get this

101676-xmcomments2.jpg

In a vb.net file in the same project the comments show, only in JS the don't show.

Do i have to kind of enable the XML comments for JS somewhere in the VS settings or have to install an addon?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,449 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,824 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 121.3K Reputation points
    2021-06-02T15:48:14.167+00:00

    Try this:

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

    and this:

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

    It seems that Visual Studio now uses “JSDoc” notations.

    1 person found this answer helpful.
    0 comments No comments

  2. olliwander123 1 Reputation point
    2021-06-02T17:02:32.657+00:00

    Thanks Viorel-1 - that was it!

    But is there a kind of backwards compatibility mode that i can activate, an addon for VS, or an import-function that automatically translates the old notation into the new one?

    I have developed an own javascript-framework with heavy use of xml-commets for all the functions of the framework.
    These comments are all in the VS2013 notation and i would be pretty annoying to translate them all by hand.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.