Fix XML documentation generation to appear in IDE tooltips + recommend markdown

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-11 23:07:32 +00:00
parent 22c5c4bfd3
commit f5b0e3209e
4 changed files with 61 additions and 8 deletions
@@ -1,5 +1,27 @@
# Documentation Attribute IDE Tooltip Example
## Recommended: Use Markdown for Code Examples
For the best IDE experience, we **strongly recommend using markdown code fences** in your `codeExample` parameter:
```csharp
[Documentation(
"MyMethod",
"Does something cool",
new[] { "param: Description" },
@"```csharp
// Use markdown code fences like this!
MyMethod(""example"");
```"
)]
```
This provides:
- ✅ Proper syntax highlighting in IDEs
- ✅ Better formatting in IntelliSense tooltips
- ✅ Consistent appearance across Visual Studio, Rider, and VS Code
- ✅ Markdown rendering in documentation generators
## Before (Without XML Doc Generator)
When using the `DocumentationAttribute` without the XML Doc Generator, IDEs would not show the documentation: