Docs: <see> xml doc topic doesn't mention the href attribute

Created on 23 Jan 2018  Â·  12Comments  Â·  Source: dotnet/docs

The syntax on the topic only shows <see cref="member"/> but not the see href syntax:
<see href="url">link text</see>

edit: added topic details


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Area - C# Guide Technology - C# Language Reference P2 Pri2 doc-enhancement dotnet-csharprod

All 12 comments

@mairaw Is there a standard or another technical document we can refer to to make sure that that syntax is/must be supported too? I've made a quick research and here's what I found:

  • Doxygen documentation only mentions the <see cref=""/> syntax;
  • Sandcastle does mention <see href=""/> as a means to support external links; besides that, Sandcastle also supports the following: <see langword=""/>;
  • In my VS2017 version 15.5.2 autocompletion only offers one option for <see ... and it's <see cref=""/> (although <see href=""/> is processed and emitted in the XML as expected).

So, there's definitely more than one view on this and we might need some reference to determine which one is correct.

I guess, if we are positive that <see href=""/> must be described in the programming guide, we might also want to fix autocompletion if VS. Also, shall we consider <see langword=""/> for the guide too?

Good points @eduard-malakhov! I'm not sure about the technical docs that show the ones that must be supported. The docs here seem to match the common options covered in the C# spec: https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#recommended-tags

Yes, if we add see href, we should also add see langword. VS IntelliSense does recognize those even though it doesn't offer them as an option when you're doing the /// commments.

@BillWagner @jcouv @gafter any thoughts on this?

@mairaw regarding this

VS IntelliSense does recognize those even though it doesn't offer them as an option when you're doing the /// commments.

I can say that in my VS2017 IntelliSense reports no errors even on the following code.

````
using System;

namespace ConsoleApp4
{
///


///
///

class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
````

untitled

And even generates a documentation file.

<?xml version="1.0"?> <doc> <assembly> <name>ConsoleApp4</name> </assembly> <members> <member name="T:ConsoleApp4.Program"> <summary> <see attribute=""/> </summary> </member> </members> </doc>

Is it possible that IntelliSense does not validate documentation comments?

There were also some discussions around having the same docs available for VB. @KathleenDollard we'll need to sync to understand what are the options supported by VB.

From my experimentation, it looks like VS supports langword (it is offered as completion, it has its own completion list and it is displayed nicely in QuickInfo).
For href, there doesn't seem to be any support at the moment (C#/VB compilers or VS). If other tools support it, then we should file a request in Roslyn repo to support in IDE).

Do we know anything about how much usage Doxygen and Sandcastle each get?

I am a bit hesitant to include a feature that will be ignored by some tools.

Do we know anything about how much usage Doxygen and Sandcastle each get?

No, and I'm not sure how we could get reliable info on their usage.

Moving this to the backlog until this is officially supported in VS. /cc @BillWagner

fyi, DocFX also supports <see href="">.

For example,

/// See <see href="https://github.com/dotnet/docs/issues/4176">issue #4176</see>.

...renders as:

image

@mairaw @BillWagner any updates on fixing the support for this or the documentation?

It would be great to make the support for href attribute in <see href=""/> tag official.

href isn't an officially supported attribute, but many tools support it anyway. There is a feature request on dotnet/csharplang to make it official, but it's unlikely to move forward in the near future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LJ9999 picture LJ9999  Â·  3Comments

sdmaclea picture sdmaclea  Â·  3Comments

ygoe picture ygoe  Â·  3Comments

garfbradaz picture garfbradaz  Â·  3Comments

tswett picture tswett  Â·  3Comments