Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<inheritdoc/> should not be used on partial properties. #1068

Open
1 of 4 tasks
Kevin-Seiden opened this issue Mar 21, 2025 · 0 comments
Open
1 of 4 tasks

<inheritdoc/> should not be used on partial properties. #1068

Kevin-Seiden opened this issue Mar 21, 2025 · 0 comments
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior

Comments

@Kevin-Seiden
Copy link

Describe the bug

The inheritdoc xml documentation tag is designed for derived members. Partial properties are not derived members, they are implementations. By including this tag on partial properties, comments added by the developer to an [ObservableProperty] adorned partial property will not show their documentation in Visual Studio IntelliSense windows.

While this may be debatable that it is an issue with Visual Studio, I'm inclined to think that partial properties are not derived, and therefore the tag is inappropriate. I've also noticed this confuses other packages, like StyleCop Analyzers. The rules for requiring documentation in that package no longer show over [ObservableProperty]s because it sees the inheritdoc tag and assumes it is documented.

I've included screenshots demonstrating the problem, as well as screenshots without CommunityToolkit.MVVM that prove it is the inheritdoc tag at fault.

Regression

No response

Steps to reproduce

  1. Create an [ObservableProperty] using partial property method with the new C# preview features while using Visual Studio.
  2. Add XML documentation to the property.
  3. Build/make sure the generator has run.
  4. Hover the mouse over the property name, notice the missing documentation.

Expected behavior

Generated partial properties should not interfere with IntelliSense.

Screenshots

Image

Image

Image

Image

IDE and version

VS 2022 Preview

IDE version

17.13.4

Nuget packages

  • CommunityToolkit.Common
  • CommunityToolkit.Diagnostics
  • CommunityToolkit.HighPerformance
  • CommunityToolkit.Mvvm (aka MVVM Toolkit)

Nuget package version(s)

8.4.0

Additional context

No response

Help us help you

No, just wanted to report this

@Kevin-Seiden Kevin-Seiden added the bug 🐛 An unexpected issue that highlights incorrect behavior label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior
Projects
None yet
Development

No branches or pull requests

1 participant