Clean-up Windows interop code and project files.#131233
Open
teo-tsirpanis wants to merge 3 commits into
Open
Conversation
…groups with identical conditions.
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/interop-contrib |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR cleans up Windows interop inclusions and project item metadata, primarily to remove unused interop sources and to normalize Link paths so Solution Explorer doesn’t show duplicate/odd Interop folder layouts.
Changes:
- Normalize several
<Link>entries for Windows interop sources to useCommon\Interop\...paths. - Remove unused Windows
LowLevelMonitorimplementation and its now-unneededKernel32interop stubs. - Fold adjacent
ItemGroups with identicalConditions in the NativeAOTSystem.Private.CoreLibproject.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/System/Threading/LowLevelMonitor.Windows.cs | Removed the Windows-specific LowLevelMonitor implementation file. |
| src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems | Fixes Link metadata for several Windows interop files; removes some compile includes for deleted/unused sources. |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CriticalSection.cs | Removed the CRITICAL_SECTION interop definition file. |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConditionVariable.cs | Removed the CONDITION_VARIABLE interop definition file. |
| src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj | Normalizes Link metadata and consolidates adjacent Windows ItemGroups. |
Comment on lines
2384
to
2387
| <Compile Include="$(MSBuildThisFileDirectory)System\Threading\DeferredDisposableLifetime.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Threading\EventWaitHandle.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelFutex.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Threading\LowLevelMonitor.Windows.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)System\Threading\Mutex.Windows.cs" /> |
Contributor
Author
There was a problem hiding this comment.
LowLevelMonitor is not being used on Windows.
teo-tsirpanis
marked this pull request as ready for review
July 23, 2026 01:11
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
MichalStrehovsky
enabled auto-merge (squash)
July 23, 2026 03:15
This was referenced Jul 23, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Linkmetadata for some Windows interop files in some projects. This fixes duplicateInteropfolders in the Solution explorer:ItemGroups with identicalConditions.