CommunityToolkit / CommunityToolkit/dotnet
Add fully qualified name to cref ObservableObject in xml comments for files generated by ObservableObjectGenerator
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
When using the ObservableObject attribute from the CommunityToolkit.Mvvm v8.3.2 package on the code behind partial class of a WPF UserControl like this:

The reference `` symbol reference is not resolved in the *.g.cs file generated by the ObservableObjectGenerator.

First, I opened a [ticket in the DocFx project](https://github.com/dotnet/docfx/issues/10259) because I found this issue working with DocFx. Analyzing the problem with a contributor from the DocFx team, I was sent over here.
**How to fix problem**
ObservableObject should be referenced by using fully qualified name.
(e,g, ``)
It probably can be fixed by changing following line.
https://github.com/CommunityToolkit/dotnet/blob/v8.3.2/src/CommunityToolkit.Mvvm/ComponentModel/ObservableObject.cs#L275
### Regression
_No response_
### Steps to reproduce
Have a look at my test project [DocFxTest](https://github.com/RobGess/DocFxTest) to reproduce this issue or follow these steps:
1. Create WPF project.
2. Add UserControl
3. Add [ObservableObject] attribute to partial class *.xaml.cs of the UserControl.
4. Check SourceGenerator's *.g.cs file's SetProperty method's comments.
### Expected behavior
Symbol should be resolved (and highlighted).
### Screenshots
_No response_
### IDE and version
VS 2022
### IDE version
17.11.5
### Nuget packages
- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [x] CommunityToolkit.Mvvm (aka MVVM Toolkit)
### Nuget package version(s)
8.3.2
### Additional context
_No response_
### Help us help you
Yes, I'd like to be assigned to work on this item.
Contributor guide
Assessment
This issue has not been assessed yet.