Skip to content

Generate XML documentation from DocumentationAttribute for IDE IntelliSense#12

Closed
Copilot wants to merge 24 commits intomainfrom
copilot/enhance-documentation-tooltip
Closed

Generate XML documentation from DocumentationAttribute for IDE IntelliSense#12
Copilot wants to merge 24 commits intomainfrom
copilot/enhance-documentation-tooltip

Conversation

Copy link

Copilot AI commented Feb 11, 2026

Custom attributes don't render in IDE tooltips. The DocumentationAttribute contains rich metadata (description, parameters, examples) but IDEs show only the raw attribute syntax since they require XML documentation files.

Implementation

XmlDocGenerator MSBuild Package

  • Roslyn-based post-build tool extracts DocumentationAttribute from compiled assemblies
  • Augments XML documentation with <summary>, <remarks>, <example> elements
  • Packaged as MSBuild SDK with automatic target integration
  • Runs AfterTargets="Build" to process final output assemblies

Integration Points

  • XmlDocGeneratorLocal.props - Local development (path resolution for net9.0 runtime)
  • build/*.targets - NuGet consumer integration via MSBuild extensibility
  • OmegaLeo.HelperLib.Documentation package dependency - transitive installation

Test Infrastructure

  • 42 unit tests covering MathExtensions, IListExtensions, BenchmarkUtility, NeoDictionary
  • xUnit framework integration
  • CI workflow already configured for automatic PR validation

XML Generation Example

// Source code (clean, attribute only)
[Documentation("Start", "Starts or restarts the stopwatch for the given key.")]
public static void Start(string key)

// Generated XML (IDE consumes this)
<member name="M:OmegaLeo.HelperLib.Helpers.BenchmarkUtility.Start(System.String)">
    <summary>Starts or restarts the stopwatch for the given key.</summary>
</member>

Configuration Updates

  • Added <GenerateDocumentationFile>true</GenerateDocumentationFile> to Changelog and Game projects (missing baseline XML generation)
  • Fixed tool path resolution from net8.0 to net9.0 (matches runtime)
  • Updated $(IntermediateOutputPath) to $(TargetDir) (IDEs read from bin, not obj)

Behavior

Library developers (ProjectReference): IDEs show source code, attributes visible in context
Package consumers (DLL reference): IDEs read XML files, rich IntelliSense from DocumentationAttribute

Works with Visual Studio, Rider, VS Code. Zero configuration for consumers - MSBuild targets auto-import from NuGet package cache.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits February 11, 2026 22:21
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add readable rendering for Documentation Attribute in hover tooltips Generate XML documentation from DocumentationAttribute for IDE tooltip support Feb 11, 2026
Copilot AI requested a review from omegaleo February 11, 2026 22:31
Copilot AI and others added 2 commits February 11, 2026 22:37
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Generate XML documentation from DocumentationAttribute for IDE tooltip support Add test project for automated PR validation Feb 11, 2026
Copilot AI and others added 3 commits February 11, 2026 22:52
…tion

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Add test project for automated PR validation Convert XmlDocGenerator to MSBuild SDK package for automatic NuGet distribution Feb 11, 2026
…d markdown

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Convert XmlDocGenerator to MSBuild SDK package for automatic NuGet distribution Fix XML doc generation targeting wrong output directory Feb 11, 2026
omegaleo and others added 2 commits February 11, 2026 23:12
… projects

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Fix XML doc generation targeting wrong output directory Document IDE behavior: XML docs only visible to library consumers, not source developers Feb 11, 2026
Copilot AI and others added 2 commits February 11, 2026 23:21
…pdate tool path

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Document IDE behavior: XML docs only visible to library consumers, not source developers Fix XML documentation generation from DocumentationAttribute for IDE tooltips Feb 11, 2026
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Fix XML documentation generation from DocumentationAttribute for IDE tooltips Enable DocumentationAttribute to generate XML documentation for IDE tooltips and add test suite Feb 11, 2026
Copilot AI and others added 3 commits February 11, 2026 23:33
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Enable DocumentationAttribute to generate XML documentation for IDE tooltips and add test suite Auto-generate IDE documentation from DocumentationAttribute Feb 11, 2026
Copilot AI and others added 4 commits February 11, 2026 23:42
…mentationAttribute

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
…consumers

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
…lean code

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
…iSense system

Co-authored-by: omegaleo <5655201+omegaleo@users.noreply.github.com>
Copilot AI changed the title Auto-generate IDE documentation from DocumentationAttribute Generate XML documentation from DocumentationAttribute for IDE IntelliSense Feb 11, 2026
@omegaleo omegaleo closed this Feb 11, 2026
@omegaleo omegaleo deleted the copilot/enhance-documentation-tooltip branch February 11, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants