Skip to content

CsWinRT 2.1.1

Compare
Choose a tag to compare
@manodasanW manodasanW released this 26 Aug 21:47
· 44 commits to master since this release
ad6c15a

This is a stable release of C#/WinRT focused on bringing .NET AOT support and improved trimming support to both the runtime and generated projections. This version requires the following Windows SDK projection package from below or later which can be consumed by setting the below property in your C# project file or by updating to September's .NET SDK servicing build once available.

More details on the effect of these improvements and known issues can be found here: https://github.com/microsoft/CsWinRT/blob/2.1.1.240807.2/docs/aot-trimming.md

C#/WinRT package:
https://www.nuget.org/packages/Microsoft.Windows.CsWinRT/2.1.1

.NET Windows SDK targeting packages for .NET 6:

<WindowsSdkPackageVersion>10.0.xxxxx.38</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.38
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.38
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.38
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.38
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.38
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.38
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.38

.NET Windows SDK targeting packages for .NET 8:

<WindowsSdkPackageVersion>10.0.xxxxx.41</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.41
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.41
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.41
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.41
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.41
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.41
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.41

As part of these Windows SDK projection builds, there were several types in the Windows.UI namespace that were moved from the WinUI projection to the Windows SDK projection to avoid long-term type conflict issues. Most of them have Microsoft.UI versions of them which are used in WinUI scenarios. There are a couple used in WinUI scenarios such as TextDecorations, BindableAttribute, and ContentPropertyAttribute. If you do use one of them and run into a type conflict issue between Microsoft.WinUI and Microsoft.Windows.SDK.NET, it can be resolved by moving to Microsoft.WindowsAppSDK 1.6 or by using the WindowsSdkPackageVersion property to use an older version of the Windows SDK projection such as .34 if you can't move forward your Microsoft.WindowsAppSDK version yet.

Thank you again to @dongle-the-gadget, @Gaoyifei1011, @hez2010, @jevansaks, @Jeremy-Price, @jlaanstra, @jkoritzinsky, @Sergio0694 for your community contributions to this significant release and for everyone who reported issues with the previews.

What's Changed

Full Changelog: 2.0.8.240703.1...2.1.1.240807.2