If class has primary constructor, cannot provide XML documentation comment for class
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
**Version Used**: .NET 8.0
**Steps to Reproduce**:
1. Create a class with primary constructor
2. Add XML documentation to primary constructor
**Expected Behavior**:
It should be possible to provide independent XML documentation comment for class data type even when primary constructor is used.
**Actual Behavior**:
The constructor XML documentation is displayed when the class data type is being hovered above:

Contributor guide
Research direction
No source file or test is named. First reproduce the issue in .NET 8 with a class primary constructor and XML documentation, then trace how the compiler or language service associates that documentation with the class and constructor. Done means the class hover shows independent class documentation and a regression test covers the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100