[package] Update Microsoft.Windows.CsWin32 from 0.3.269 to 0.3.275#66944
Merged
Conversation
- Bumps CsWin32 version in eng/Versions.props - Fixes breaking change: HttpCloseRequestQueue now takes HTTP_REQUEST_QUEUE_HANDLE struct instead of SafeHandle; replace explicit PInvoke call with Handle.Dispose() since the SafeHandle already calls HttpCloseRequestQueue in ReleaseHandle - Removes hardcoded cast workaround: HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfo is now generated by CsWin32 0.3.275 (previously required integer cast workaround) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3 tasks
BrennanConroy
approved these changes
Jun 1, 2026
DeagleGross
approved these changes
Jun 1, 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.
Summary
Updates
Microsoft.Windows.CsWin32from0.3.269to0.3.275and fixes associated breaking changes and workarounds.Version Change
eng/Versions.props:0.3.269→0.3.275CsWin32 0.3.275 Changelog
outreference if handle cannot be trivially represented as aSafeHandleBreaking Change Fixed:
HttpCloseRequestQueuesignature changeFile:
src/Servers/HttpSys/src/NativeInterop/RequestQueue.csCsWin32 0.3.275 changed
PInvoke.HttpCloseRequestQueueto takeHTTP_REQUEST_QUEUE_HANDLE(a struct) instead ofSafeHandle(CsWin32 issue #1672).HttpCreateRequestQueuenow returnsHttpCloseRequestQueueSafeHandle(a SafeHandle subclass that callsHttpCloseRequestQueueinReleaseHandle).Fix: Replace the explicit
PInvoke.HttpCloseRequestQueue(Handle)call withHandle.Dispose(). SinceHandleis aHttpCloseRequestQueueSafeHandle, callingDispose()correctly closes the queue handle (viaReleaseHandle) before theBoundHandleis disposed. The now-redundantHandle.SetHandleAsInvalid()call was also removed.Workaround Removed:
HTTP_REQUEST_PROPERTY.HttpRequestPropertyTlsCipherInfoenum castFile:
src/Servers/IIS/IIS/src/Core/IISHttpContext.csPreviously a hardcoded integer cast was required because CsWin32 did not generate the
HttpRequestPropertyTlsCipherInfoenum member:CsWin32 0.3.275 (via updated win32 metadata) now generates this member, so the cast workaround is no longer needed.
Build Output
Both affected projects build successfully with 0 warnings and 0 errors:
Microsoft.AspNetCore.Server.HttpSys.csproj✅Microsoft.AspNetCore.Server.IIS.csproj✅Remaining Workarounds (not yet removable)
_sockaddr.sin6_addr.u.Byte.AsReadOnlySpan()src/Shared/HttpSys/NativeInterop/SocketAddress.cs__byte_16still lacks implicitReadOnlySpan<byte>conversionSecPkgContext_CipherInfostructsrc/Shared/HttpSys/NativeInterop/SecPkgContext_CipherInfo.cs