Skip to content

Add comprehensive XML documentation to FileVersionInfo from dotnet-api-docs#124133

Closed
Copilot wants to merge 7 commits intomainfrom
copilot/add-xml-comments-to-runtime
Closed

Add comprehensive XML documentation to FileVersionInfo from dotnet-api-docs#124133
Copilot wants to merge 7 commits intomainfrom
copilot/add-xml-comments-to-runtime

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

Description

Migrated comprehensive XML documentation from the dotnet-api-docs repository to the FileVersionInfo source code. All public members of FileVersionInfo now have complete inline documentation including summaries, returns tags, and detailed remarks sections with examples.

Changes

  • Added <returns> tags to 27 properties documenting return values and null/zero behavior when version info is missing
  • Added method documentation to GetVersionInfo: <param>, <exception>, and <returns> tags
  • Enhanced ToString documentation with multi-line <returns> listing all properties included in output
  • Fixed int property documentation: Correctly documents returning 0 instead of null for FileBuildPart, FilePrivatePart, ProductBuildPart, ProductMajorPart, ProductMinorPart, ProductPrivatePart
  • Added comprehensive <remarks> sections to the FileVersionInfo class and all 28 public members (26 properties + 2 methods) with markdown-formatted content including:
    • Detailed explanations of version number structure and bit layout
    • Information about version resources and Win32 resource files
    • Code examples demonstrating usage
    • Links to additional documentation

Source

Documentation was migrated from the authoritative source at https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Diagnostics/FileVersionInfo.xml, ensuring all remarks, examples, and supplementary documentation are preserved.

Example

Before:

/// <summary>
/// Gets the build number of the file.
/// </summary>
public int FileBuildPart { get { return _fileBuild; } }

After:

/// <summary>
/// Gets the build number of the file.
/// </summary>
/// <returns>A value representing the build number of the file or 0 (zero) if the file did not contain version information.</returns>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
///  Typically, a version number is displayed as "major number.minor number.build number.private part number". A file version number is a 64-bit number that holds the version number for a file as follows:
///
/// - The first 16 bits are the <xref:System.Diagnostics.FileVersionInfo.FileMajorPart%2A> number.
/// - The next 16 bits are the <xref:System.Diagnostics.FileVersionInfo.FileMinorPart%2A> number.
/// - The third set of 16 bits are the <xref:System.Diagnostics.FileVersionInfo.FileBuildPart%2A> number.
/// - The last 16 bits are the <xref:System.Diagnostics.FileVersionInfo.FilePrivatePart%2A> number.
///
///  This property gets the third set of 16 bits.
///
/// ## Examples
///  The following example calls <xref:System.Diagnostics.FileVersionInfo.GetVersionInfo%2A> to get the <xref:System.Diagnostics.FileVersionInfo> for the Notepad...
/// ]]></format>
/// </remarks>
public int FileBuildPart { get { return _fileBuild; } }

Testing

  • Validated build succeeds with no warnings
  • StyleCop checks pass
  • No security vulnerabilities introduced
  • All XML documentation properly formatted as markdown within <format type="text/markdown"><![CDATA[ blocks
Original prompt

Take the XML documentation comments from the FileVersionInfo.xml files in this repo (dotnet-api-docs) and put them into the /// XML comments in the dotnet/runtime repo please. Remarks should be formatted as Markdown in the /// XML. If there's a conflict between the two versions of the docs (/// vs. the ECMAXML in this dotnet-api-docs repo), insert <<<<< style conflict markers.


💡 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.

Copilot AI and others added 2 commits February 7, 2026 23:28
…methods

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
…rsion info

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
@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 7, 2026
Copilot AI changed the title [WIP] Add XML documentation comments from FileVersionInfo.xml Add XML documentation comments to FileVersionInfo from reference XML Feb 7, 2026
Copilot AI requested a review from gewarren February 7, 2026 23:32
@gewarren
Copy link
Contributor

gewarren commented Feb 9, 2026

@copilot which FileVersionInfo.xml file did you use as the source? For example, there are remarks in this file that didn't get backported: https://github.com/dotnet/dotnet-api-docs/blob/18b20a1aa5c04863abb9375ac91c1da34c8bf215/xml/System.Diagnostics/FileVersionInfo.xml#L56.

Copy link
Contributor Author

Copilot AI commented Feb 9, 2026

@copilot which FileVersionInfo.xml file did you use as the source? For example, there are remarks in this file that didn't get backported: https://github.com/dotnet/dotnet-api-docs/blob/18b20a1aa5c048...

I used the FileVersionInfo.xml from .dotnet/packs/Microsoft.NETCore.App.Ref/ which only had <summary> and <returns> tags. I'll now add the <remarks> sections from the dotnet-api-docs repository at https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Diagnostics/FileVersionInfo.xml.

Copilot AI and others added 4 commits February 9, 2026 18:37
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 Add XML documentation comments to FileVersionInfo from reference XML Add comprehensive XML documentation to FileVersionInfo from dotnet-api-docs Feb 9, 2026
@gewarren gewarren closed this Feb 10, 2026
@jkotas jkotas deleted the copilot/add-xml-comments-to-runtime branch March 1, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants