Skip to content

[package] Update Microsoft.Windows.CsWin32 from 0.3.275 to 0.3.296 - #67501

Merged
BrennanConroy merged 1 commit into
mainfrom
update/cswin32-to-0.3.296-f3e29d5dfd5d767f
Jul 1, 2026
Merged

BrennanConroy merged 1 commit into
mainfrom
update/cswin32-to-0.3.296-f3e29d5dfd5d767f

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Bumps Microsoft.Windows.CsWin32 from 0.3.275 to 0.3.296 in eng/Versions.props.

Version change

Package Old New
Microsoft.Windows.CsWin32 0.3.275 0.3.296

Notable changes in 0.3.276–0.3.296 (from release notes)

  • v0.3.287: Fixed broken code generated due to hardcoded "PInvoke" classname; fixed IStream.Read/Write forwarding; fixed IComIID on downlevel TFMs; fixed IDispatch property returns; added [Optional] on optional params
  • v0.3.296: Fixed CsWin32-generated COM structs tripping CS3016 under [assembly: CLSCompliant(true)]; new generic <T> overloads for IID_PPV_ARGS pattern; fields in anonymous nested structs exposed with property getters on nesting struct; inline arrays flattening

Workaround audit

Workaround that remains (cannot be removed)

src/Shared/HttpSys/NativeInterop/SocketAddress.cs — AsReadOnlySpan() call on sin6_addr.u.Byte

// when CsWin32 gets support for inline arrays, remove 'AsReadOnlySpan' call below.
// https://github.com/microsoft/CsWin32/issues/1086
return new IPAddress(_sockaddr.sin6_addr.u.Byte.AsReadOnlySpan());

Issue microsoft/CsWin32#1086 ("Leverage .NET 8/C# 12 inline arrays") was closed on 2025-12-15 as not planned. CsWin32 still generates Windows.Win32.__byte_16 (a fixed-buffer struct) for this field, and the AsReadOnlySpan() extension method call is still required. Removing it causes CS1503: Argument 1: cannot convert from 'Windows.Win32.__byte_16' to 'byte[]'. Workaround stays.

src/Servers/HttpSys/src/NativeInterop/HttpApi.cs — GetProcAddress for HttpQueryRequestProperty/HttpSetRequestProperty

These are intentional runtime feature detection patterns (not CsWin32 workarounds). The functions may be absent on some Windows versions, so runtime presence checks via GetProcAddress are the correct approach.

Build verification

Both affected projects build cleanly with the new version:

dotnet build src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj
→ Build succeeded. 0 Warning(s) 0 Error(s)

dotnet build src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
→ Build succeeded. 0 Warning(s) 0 Error(s)

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • southcentralus0.in.applicationinsights.azure.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "southcentralus0.in.applicationinsights.azure.com"

See Network Configuration for more information.

Generated by Update CsWin32 Package · 149.8 AIC · ⌖ 12 AIC · ⊞ 8.6K · ◷

@github-actions github-actions Bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Jul 1, 2026
@github-actions
github-actions Bot requested review from a team and wtgodbe as code owners July 1, 2026 01:16
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Note: After merging, push all packages to dotnet-public repo by queuing a build from [dotnet-migrate-package]((dev.azure.com/redacted)

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • southcentralus0.in.applicationinsights.azure.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "southcentralus0.in.applicationinsights.azure.com"

See Network Configuration for more information.

Generated by Update CsWin32 Package · 149.8 AIC · ⌖ 12 AIC · ⊞ 8.6K · ◷

@github-actions github-actions Bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Jul 1, 2026
@BrennanConroy
BrennanConroy merged commit 242c474 into main Jul 1, 2026
24 checks passed
@BrennanConroy
BrennanConroy deleted the update/cswin32-to-0.3.296-f3e29d5dfd5d767f branch July 1, 2026 22:23
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant