Cleanup Win7 and earlier compatibility from CoreCLR#122884
Merged
jkotas merged 2 commits intodotnet:mainfrom Jan 6, 2026
Merged
Cleanup Win7 and earlier compatibility from CoreCLR#122884jkotas merged 2 commits intodotnet:mainfrom
jkotas merged 2 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @mangod9 |
Contributor
There was a problem hiding this comment.
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 |
Co-authored-by: Copilot <[email protected]>
This was referenced Jan 5, 2026
jkotas
reviewed
Jan 6, 2026
Member
|
Some of this cleanup was done by copilot in #122907 |
jkotas
reviewed
Jan 6, 2026
jkotas
approved these changes
Jan 6, 2026
This was referenced Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:0x800to 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 namedversion.dll).