Skip to content

Backport XML docs for System.Diagnostics.FileVersionInfo from dotnet-api-docs#124405

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/backport-xml-docs-fileversioninfo
Draft

Backport XML docs for System.Diagnostics.FileVersionInfo from dotnet-api-docs#124405
Copilot wants to merge 6 commits intomainfrom
copilot/backport-xml-docs-fileversioninfo

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Description

Backports XML documentation from dotnet-api-docs to the System.Diagnostics.FileVersionInfo source implementation.

Changes

  • Source implementation (FileVersionInfo.cs): Added <summary>, <value>, <param>, and <returns> tags to all public members
  • Documentation fixes: Corrected value documentation for int properties (FileBuildPart, FilePrivatePart, Product*Part) to return 0 instead of null when version info is missing (original dotnet-api-docs XML had incorrect null references for value types)

Note on Compiler-Generated Docs

This library keeps <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile> in the project file because:

  • The library uses GeneratePlatformNotSupportedAssemblyMessage which generates platform-not-supported stub files
  • These generated stubs would require XML documentation to avoid CS1591 errors
  • Per repository conventions, documentation should never be added to ref assemblies
  • Therefore, compiler-generated docs cannot be enabled, and documentation remains in the source implementation only

Example

Properties now have complete inline documentation:

/// <summary>
/// Gets the build number of the file.
/// </summary>
/// <value>A value representing the build number of the file or 0 (zero) if the file did not contain version information.</value>
public int FileBuildPart { get; }
Original prompt

Please backport the XML docs from https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Diagnostics/FileVersionInfo.xml to the source implementation and update the .csproj file to use the compiler generated docs. Follow the pattern in #124227.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 13, 2026
Copilot AI and others added 4 commits February 13, 2026 23:04
…d docs

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot AI changed the title [WIP] Backport XML documentation for FileVersionInfo Backport XML docs for System.Diagnostics.FileVersionInfo from dotnet-api-docs Feb 13, 2026
Copilot AI requested a review from gewarren February 13, 2026 23:30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Docs should never be added to the ref assembly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the XML docs from the ref assembly in commit a640b63. Also restored UseCompilerGeneratedDocXmlFile=false in the csproj since enabling compiler-generated docs would require XML documentation in the generated platform-not-supported stubs, which would need to come from the ref assembly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richlander @jeffhandley Is Copilot correct that there needs to be docs in the ref assembly here?

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/area-system-diagnostics
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants