Skip to content

Clean-up Windows interop code and project files.#131233

Open
teo-tsirpanis wants to merge 3 commits into
dotnet:mainfrom
teo-tsirpanis:cleanup-windows-interop
Open

Clean-up Windows interop code and project files.#131233
teo-tsirpanis wants to merge 3 commits into
dotnet:mainfrom
teo-tsirpanis:cleanup-windows-interop

Conversation

@teo-tsirpanis

@teo-tsirpanis teo-tsirpanis commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
image
  • Folds some adjacent ItemGroups with identical Conditions.

Copilot AI review requested due to automatic review settings July 22, 2026 19:58
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jul 22, 2026
@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
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 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 use Common\Interop\... paths.
  • Remove unused Windows LowLevelMonitor implementation and its now-unneeded Kernel32 interop stubs.
  • Fold adjacent ItemGroups with identical Conditions in the NativeAOT System.Private.CoreLib project.

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" />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LowLevelMonitor is not being used on Windows.

Copilot AI review requested due to automatic review settings July 22, 2026 23:34

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

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

@teo-tsirpanis
teo-tsirpanis marked this pull request as ready for review July 23, 2026 01:11
@azure-pipelines

Copy link
Copy Markdown
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 MichalStrehovsky 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.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Runtime.InteropServices community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants