dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 672 forks source link

Missing XML comments from Base Classes / Interfaces using Inheritdoc #4730

Open pbstrein opened 3 years ago

pbstrein commented 3 years ago

Issue Description

<inheritdoc /> does not show documentation from base classes / interfaces when using Intellisense. This includes:

3652 fixed <inheritdoc/> within the same class, but the functionality is still missing when using <inheritdoc/> for methods/properties defined in base classes / interfaces.

This issue makes the developer experience in VSCode more difficult since it makes it harder to share XML docs and requires the developer to go to base classes / directly to view the XML docs. Since VS2019 has the functionality I expect, it makes me want to do development in VS2019 instead of VSCode when working in C#.

Steps to Reproduce

  1. Create a base class / interface that has XML docs in it (or use one from any standard library like Attribute.)
  2. Create a class that inherits / implements from the base class / interface
  3. Override / implement a method / property on the base class / interface.
  4. Mark the method / property with <inheritdoc />
  5. Notice that no intellisense shows up for the derived method/property.
  6. Add cref=<base-class>.<method.
  7. Nothing shows up for intellisense when marking it explicitly either.

Expected Behavior

It should be similar to VS2019. When hovering using mouse: image

When calling the class using Intellisense: image

Actual Behavior

When hovering using mouse: image

When calling the class using Intellisense: image

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Installing C# dependencies... Platform: linux, x86_64, name=ubuntu, version=20.04

Downloading package 'OmniSharp for Linux (x64)' (36731 KB).................... Done! Validating download... Integrity Check succeeded. Installing package 'OmniSharp for Linux (x64)'

Downloading package '.NET Core Debugger (linux / x64)' (59506 KB).................... Done! Validating download... Integrity Check succeeded. Installing package '.NET Core Debugger (linux / x64)'

Downloading package 'Razor Language Server (Linux / x64)' (61682 KB).................... Done! Installing package 'Razor Language Server (Linux / x64)'

Finished

Environment information

VSCode version: 1.59.1 C# Extension: 1.23.14

Mono Information OmniSharp using built-in mono
Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.302 Commit: c005824e35 Runtime Environment: OS Name: ubuntu OS Version: 20.04 OS Platform: Linux RID: ubuntu.20.04-x64 Base Path: /usr/share/dotnet/sdk/5.0.302/ Host (useful for support): Version: 5.0.8 Commit: 35964c9215 .NET SDKs installed: 5.0.302 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 5.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |code-spell-checker|streetsidesoftware|1.10.2| |csharp|ms-dotnettools|1.23.14| |EditorConfig|EditorConfig|0.16.4| |githistory|donjayamanne|0.6.18| |gitlens|eamodio|11.6.0| |output-colorizer|IBM|0.1.2| |terraform|hashicorp|2.14.0| |todo-tree|Gruntfuggly|0.0.213| |vscode-docker|ms-azuretools|1.16.0| |vscode-markdownlint|DavidAnson|0.43.2| |vscode-proto3|zxh404|0.5.4| |vscode-yaml|redhat|0.22.0|;
pbstrein commented 3 years ago

I noticed this appears to also fail when using with specific paths to specific classes.

I can highlight and see the docs with my mouse For example: image

But when I try to use intellisense, the docs don't appear. image

jcotton42 commented 2 years ago

I also ran into this, put a minimal repro in this gist https://gist.github.com/jcotton42/563ee03f89a88e6707e67e3597ef6245 VS Code version info Version: 1.68.0-insider (user setup) Commit: 17c75e11805103026b943c8dc4d50a35f245f76f Date: 2022-05-20T05:16:17.334Z Electron: 17.4.4 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Windows_NT x64 10.0.22000

C# extension version: 1.24.4