Skip to content

Improve version retrieval in UserAgent.cs #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2025

Conversation

MattB-msft
Copy link
Member

Updated version retrieval logic to use FileVersionInfo for more accurate versioning. Added error handling to fall back to assembly name version if file version is unavailable. Included necessary namespace for diagnostics.

Updated version retrieval logic to use FileVersionInfo for more accurate versioning. Added error handling to fall back to assembly name version if file version is unavailable. Included necessary namespace for diagnostics.
@Copilot Copilot AI review requested due to automatic review settings May 14, 2025 01:01
@MattB-msft MattB-msft requested a review from a team as a code owner May 14, 2025 01:01
@github-actions github-actions bot added the ML: Core Tags changes to core libraries label May 14, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the version retrieval logic in UserAgent.cs by using FileVersionInfo to obtain a more accurate version, and adds error handling to fall back to the assembly name version if necessary.

  • Updates the version retrieval method to use FileVersionInfo
  • Adds error handling via a try-catch block
  • Includes the necessary System.Diagnostics namespace

@MattB-msft MattB-msft enabled auto-merge (squash) May 14, 2025 03:02
@MattB-msft MattB-msft merged commit 2152d21 into main May 14, 2025
8 checks passed
@MattB-msft MattB-msft deleted the users/mbarbour/UpdateUserAgentForFileVersionInfo branch May 14, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ML: Core Tags changes to core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants