question

olliwander123-7334 avatar image
0 Votes"
olliwander123-7334 asked XingyuZhao-MSFT edited

Visual Studio 2019 Javascript XML Comments not showing

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?




vs-generaldotnet-visual-basic
xmlcomments1.jpg (56.8 KiB)
xmcomments2.jpg (22.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Viorel-1 avatar image
1 Vote"
Viorel-1 answered Viorel-1 edited

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

olliwander123-7334 avatar image
0 Votes"
olliwander123-7334 answered Viorel-1 commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Maybe there are some conversion tools, perhaps on GitHub: https://www.bing.com/search?q=vsdoc+to+jsdoc+converter.


0 Votes 0 ·