Skip to content

Remove dependency to Microsoft.DotNet.PlatformAbstractions.#3190

Merged
timcassell merged 1 commit into
dotnet:masterfrom
teo-tsirpanis:rm-platformabstractions
Jul 3, 2026
Merged

Remove dependency to Microsoft.DotNet.PlatformAbstractions.#3190
timcassell merged 1 commit into
dotnet:masterfrom
teo-tsirpanis:rm-platformabstractions

Conversation

@teo-tsirpanis

Copy link
Copy Markdown
Contributor

Microsoft.DotNet.PlatformAbstractions is a package that no longer receives updates since .NET 5. This PR removes this dependency from BenchmarkDotNet, and replaces its usage with built-in APIs.

@timcassell timcassell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks

@timcassell timcassell merged commit 40736e9 into dotnet:master Jul 3, 2026
11 checks passed
@timcassell timcassell added this to the v0.16.0 milestone Jul 3, 2026
@teo-tsirpanis teo-tsirpanis deleted the rm-platformabstractions branch July 3, 2026 22:17
string operatingSystem = RuntimeEnvironment.OperatingSystem;
string operatingSystemVersion = RuntimeEnvironment.OperatingSystemVersion;
string operatingSystem = OSDescription;
string operatingSystemVersion = Environment.OSVersion.ToString();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These APIs do not seem to be compatible.

Microsoft.DotNet.PlatformAbstractions APIs returns following outputs.

  • Windows
  • 10.0.26200

In contrast, replaced API returns following outputs.

  • Microsoft Windows 10.0.26200
  • Microsoft Windows NT 6.2.9200.0

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.

3 participants