Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove Environment.IsWindows8OrAbove property and related Windows 7 compatibility code - #122810

#122810
Merged
jkotas merged 4 commits into
maindotnet/runtime:mainfrom
copilot/remove-windows8-or-above-propertydotnet/runtime:copilot/remove-windows8-or-above-propertyCopy head branch name to clipboard
Jan 1, 2026
Merged

Remove Environment.IsWindows8OrAbove property and related Windows 7 compatibility code#122810
jkotas merged 4 commits into
maindotnet/runtime:mainfrom
copilot/remove-windows8-or-above-propertydotnet/runtime:copilot/remove-windows8-or-above-propertyCopy head branch name to clipboard

Conversation

Copilot AI commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

Removed Environment.IsWindows8OrAbove internal property and related Windows 7 compatibility code, which is obsolete since Windows 7 is no longer supported.

Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove Environment.IsWindows8OrAbove property and its references Remove Environment.IsWindows8OrAbove property Jan 1, 2026
Copilot AI requested a review from jkotas January 1, 2026 00:30
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tannergooding We have a hard dependency on Win8+ after the recent change so IsWindows8OrAbove condition can be deleted

@jkotas
jkotas marked this pull request as ready for review January 1, 2026 00:59
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

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.

Pull request overview

This PR removes the obsolete Environment.IsWindows8OrAbove internal property, which always returned true since Windows 8 is now the minimum supported version. The cleanup eliminates dead code paths that were unreachable on currently supported platforms.

Key changes:

  • Removed IsWindows8OrAbove property and WindowsVersion helper class from Environment.Win32.cs
  • Removed Windows 7/Server 2008 R2 workarounds in CompareInfo.Nls.cs (3 conditional blocks for LCMapStringEx buffer handling)
  • Simplified conditional logic in EventSource.cs by removing an always-true condition

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
Environment.Win32.cs Removed the IsWindows8OrAbove property definition and the WindowsVersion helper class
CompareInfo.Nls.cs Removed 3 Windows 7/Server 2008 R2 specific workarounds for LCMapStringEx buffer handling that were no longer executed
EventSource.cs Removed conditional check and made SetInformation call unconditional (the condition was always true)

The code changes are clean and correct. All removed code paths were indeed unreachable since IsWindows8OrAbove always returned true. The removal of the Windows 7/Server 2008 R2 workarounds is appropriate, and the EventSource.cs logic simplification correctly reflects that the original condition (this.Name != "System.Diagnostics.Eventing.FrameworkEventSource" || Environment.IsWindows8OrAbove) was always true. No issues found.

@vcsjones

vcsjones commented Jan 1, 2026

Copy link
Copy Markdown
Member

I take it I can start opening pull requests for #71075?

@jkotas

jkotas commented Jan 1, 2026

Copy link
Copy Markdown
Member

I take it I can start opening pull requests for #71075?

Yes, these cleanups can proceed now.

Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Copilot AI changed the title Remove Environment.IsWindows8OrAbove property Remove Environment.IsWindows8OrAbove property and related Windows 7 compatibility code Jan 1, 2026
Copilot AI requested a review from jkotas January 1, 2026 09:42
@jkotas

jkotas commented Jan 1, 2026

Copy link
Copy Markdown
Member

/ba-g wasm timeout without a log

@jkotas
jkotas merged commit 732f597 into main Jan 1, 2026
145 of 147 checks passed
@jkotas
jkotas deleted the copilot/remove-windows8-or-above-property branch January 1, 2026 14:56
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.