ReleaseMicrosoftMicrosoftpublished Nov 12, 2024seen 3d

microsoft/CsWinRT 2.2.0.241111.1

microsoft/CsWinRT

Open original ↗

Captured source

source ↗
published Nov 12, 2024seen 3dcaptured 9hhttp 200method plain

CsWinRT 2.2.0

Repository: microsoft/CsWinRT

Tag: 2.2.0.241111.1

Published: 2024-11-12T03:04:17Z

Prerelease: no

Release notes: This is a release with fixes for several reported issues in the October .NET SDK release which had the initial Windows SDK projections and source generator based on the CsWinRT 2.1.x release.

This release addresses one of the key feedbacks where the source generator was running in WPF / WinForms scenarios with respect to the entire app which wasn't needed given the primary API boundary in such apps isn't WinRT. Whereas in WinUI based apps, WinRT is a main ABI boundary and the source generator will continue to run. For WPF / WinForms apps which want to be trimming and AOT compatible with respect to the WinRT calls that they have, they can make use of the new attributes added to opt-in the source generator for those types. Note that these opt-in attributes can also be used in WinUI scenarios for scenarios that the source generator isn't detecting. Also note that if the change in source generation mode isn't desired for your project, the mode can be explicitly set using the CsWinRTAotOptimizerEanbled property to go back to Auto mode. More details on that and in general with these changes can be found here.

Even though this release is focused on fixes, due to the addition of new attributes to be used with the source generator, this is a minor version increment release. Also given the .NET 6 EOL, the new attributes are only added for .NET 8 and later.

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

.NET Windows SDK targeting packages for .NET 6:

10.0.xxxxx.55

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.55 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.55 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.55 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.55 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.55 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.55 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.55

.NET Windows SDK targeting packages for .NET 8:

10.0.xxxxx.56

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.56 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.56 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.56 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.56 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.56 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.56 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.56

.NET Windows SDK targeting packages for .NET 8 and UWP support:

10.0.xxxxx.57

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.57 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.57 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.57 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.57 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.57 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.57 https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.57

For more details on the CsWinRT 2.1.x release in general, see the CsWinRT 2.1.1 release notes.

What's Changed

  • Fix enum attribute argument. by @dongle-the-gadget in https://github.com/microsoft/CsWinRT/pull/1827
  • Improve exception messages for failed casts by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1826
  • Skip QI and 'IObjectReference' allocation in IDIC fallback by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1833
  • Add null checks to some 'Marshal.Release' calls by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1832
  • Fix types in attributes being projected as System.Type in WinMD. by @dongle-the-gadget in https://github.com/microsoft/CsWinRT/pull/1829
  • Fix exception when using funcs and take another approach to escape assembly name by @manodasanW in https://github.com/microsoft/CsWinRT/pull/1836
  • Fix 'CsWinRT1028' for generated 'EventSource' by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1840
  • Minor improvements to 'ExceptionHelpers.SetErrorInfo' by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1824
  • Updated issue templates with Issue Form by @0x5bfa in https://github.com/microsoft/CsWinRT/pull/1842
  • Support explicitly implementing 'ICustomPropertyProvider' by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1841
  • Add 'CsWinRTDynamicallyInterfaceCastableExclusiveTo' by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1835
  • Add GC.KeepAlive when doing ABI call by @manodasanW in https://github.com/microsoft/CsWinRT/pull/1848
  • Special case internal 'ReadOnlyList' type by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1847
  • Improve ICPP exception messages by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1857
  • Support [GeneratedBindableCustomProperty] on structs and records by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1854
  • Add OptIn mode for source generator by @manodasanW in https://github.com/microsoft/CsWinRT/pull/1861
  • Bump Mono.Cecil to 0.11.6 by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1862
  • Fix exception propagation by @manodasanW in https://github.com/microsoft/CsWinRT/pull/1856
  • Add 'WinRTManagedOnlyTypeDetails' type by @Sergio0694 in https://github.com/microsoft/CsWinRT/pull/1815
  • Exclude System GuidAttribute from WinMD. by @dongle-the-gadget in https://github.com/microsoft/CsWinRT/pull/1855
  • Replace null pointer function pointer call with helpful exception. by @manodasanW in https://github.com/microsoft/CsWinRT/pull/1866
  • Fix scenario where source generator isn't detecting parameters passed to WinRT mapped interfaces by @manodasanW in https://github.com/microsoft/CsWinRT/pull/1867

New Contributors

  • @0x5bfa made their first contribution in https://github.com/microsoft/CsWinRT/pull/1842

Full Changelog: https://github.com/microsoft/CsWinRT/compare/2.1.6.241013.1...2.2.0.241111.1

Notability

notability 2.0/10

Routine library release.