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

Cleanup Win7 and earlier compatibility from CoreCLR - #122884

#122884
Merged
jkotas merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
jkoritzinsky:win7-coreclr-cleanupjkoritzinsky/runtime:win7-coreclr-cleanupCopy head branch name to clipboard
Jan 6, 2026
Merged

Cleanup Win7 and earlier compatibility from CoreCLR#122884
jkotas merged 2 commits into
dotnet:maindotnet/runtime:mainfrom
jkoritzinsky:win7-coreclr-cleanupjkoritzinsky/runtime:win7-coreclr-cleanupCopy head branch name to clipboard

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

When running on Windows, we are now always running on Win8.

We also don't need to delay-load the WinRT APIs used by CoreCLR anymore as they're always available.

We can also remove the delay loading for version.dll now that we pass /DEPENDENTLOADFLAG:0x800 to force dependencies to be loaded from System32 (the original reason for the delay load hook was to force System32 instead of the default lookup rules for the commonly named version.dll).

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @mangod9
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 Windows 7 compatibility code from CoreCLR, reflecting that the minimum supported version is now Windows 8 or later. The changes streamline the codebase by removing version detection logic, eliminating delay-load infrastructure for WinRT APIs, and simplifying WinRT initialization code.

Key changes:

  • Removes the delay-load hook mechanism and associated delay-load directives for WinRT and version.dll, as these APIs are now always available
  • Eliminates OS version detection code that checked for Windows 7 vs Windows 8
  • Removes WinRT support checks since WinRT is now assumed to be available on all supported platforms

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/native/libs/Common/delayloadhook_windows.cpp Complete removal of delay-load security hook used to force System32 search path for delay-loaded DLLs
src/native/corehost/apphost/static/CMakeLists.txt Removes delay-load directives for WinRT API and version.dll, removes delayloadhook reference and delayimp.lib dependency, fixes trailing whitespace
src/coreclr/vm/threads.cpp Removes WinRTSupported() assertions since WinRT is now always available, updates comments to reflect this
src/coreclr/utilcode/util_nodependencies.cpp Removes InitRunningOnVersionStatus() function and gRunningOnStatus global variable used for OS version detection
src/coreclr/inc/ostype.h Removes RunningOnStatusEnum, gRunningOnStatus, InitRunningOnVersionStatus(), RunningOnWin8(), and WinRTSupported() declarations
src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt Removes delay-load directives for WinRT and version.dll, removes delayimp.lib dependency
src/coreclr/dlls/mscoree/CMakeLists.txt Removes delayloadhook_windows.cpp and Native.rc from sources list

Comment thread src/coreclr/dlls/mscoree/CMakeLists.txt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt
@jkotas

jkotas commented Jan 6, 2026

Copy link
Copy Markdown
Member

Some of this cleanup was done by copilot in #122907

Comment thread src/coreclr/vm/threads.cpp
@jkotas
jkotas merged commit 841eb85 into dotnet:main Jan 6, 2026
162 of 164 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 6, 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.

3 participants

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