Skip to content

Releases: microsoft/CsWinRT

CsWinRT 2.2.0

12 Nov 03:04
8649ee3
Compare
Choose a tag to compare

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:

<WindowsSdkPackageVersion>10.0.xxxxx.55</WindowsSdkPackageVersion>

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:

<WindowsSdkPackageVersion>10.0.xxxxx.56</WindowsSdkPackageVersion>

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:

<WindowsSdkPackageVersion>10.0.xxxxx.57</WindowsSdkPackageVersion>

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

New Contributors

Full Changelog: 2.1.6.241013.1...2.2.0.241111.1

CsWinRT 2.1.6

15 Oct 00:28
3478372
Compare
Choose a tag to compare

This is a minor 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.

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

.NET Windows SDK targeting packages for .NET 6:

<WindowsSdkPackageVersion>10.0.xxxxx.52</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.52
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.52
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.52
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.52
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.52
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.52
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.52

.NET Windows SDK targeting packages for .NET 8:

<WindowsSdkPackageVersion>10.0.xxxxx.53</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.53
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.53
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.53
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.53
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.53
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.53
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.53

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

<WindowsSdkPackageVersion>10.0.xxxxx.54</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.54
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.54
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.54
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.54
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.54
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.54
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.54

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

What's Changed

Full Changelog: 2.1.5.241003.1...2.1.6.241013.1

CsWinRT 2.1.5

04 Oct 01:02
ad5cc38
Compare
Choose a tag to compare

This is a minor release with fixes for reported issues particularly related to the WinRT source generator generating code that may not compile in some cases and a fix to ToArray in certain scenarios.

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

.NET Windows SDK targeting packages for .NET 6:

<WindowsSdkPackageVersion>10.0.xxxxx.46</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.46
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.46
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.46
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.46
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.46
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.46
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.46

.NET Windows SDK targeting packages for .NET 8:

<WindowsSdkPackageVersion>10.0.xxxxx.47</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.47
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.47
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.47
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.47
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.47
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.47
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.47

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

<WindowsSdkPackageVersion>10.0.xxxxx.48</WindowsSdkPackageVersion>

https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.48
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.48
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.48
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.48
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.48
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.48
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.48

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

What's Changed

Full Changelog: 2.1.3.240909.1...2.1.5.241003.1

CsWinRT 2.1.3

10 Sep 19:57
b55ca83
Compare
Choose a tag to compare

This is a minor release with a set of fixes for reported issues since 2.1.1.

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

What's Changed

Full Changelog: 2.1.1.240807.2...2.1.3.240909.1

CsWinRT 2.1.1

26 Aug 21:47
ad6c15a
Compare
Choose a tag to compare

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

Read more

CsWinRT 2.1.0-prerelease.240801.1

02 Aug 19:30
b1ecedd
Compare
Choose a tag to compare
Pre-release

This is a prerelease version of C#/WinRT with more bug fixes and improvements to our .NET AOT support. Note that in this release that the WinRT.BindableCustomProperty attribute added in last week's prerelease was renamed to WinRT.GeneratedBindableCustomProperty based on early feedback. This version requires the preview Windows SDK projection package from below which can be consumed by setting the following property in your C# project file:

<WindowsSdkPackageVersion>10.0.xxxxx.37-preview</WindowsSdkPackageVersion>

C#/WinRT package:
https://www.nuget.org/packages/Microsoft.Windows.CsWinRT/2.1.0-prerelease.240801.1

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

What's Changed

  • Fix property initializers and derived ObservableCollection by @manodasanW in #1686
  • Fix merged component support in non-WinRT component projects by @Sergio0694 in #1680
  • Fix nullable scenarios when xaml asks for type and fix vtable for event handlers by @manodasanW in #1684
  • Remove redundant items in .targets by @Sergio0694 in #1687
  • Fix source generator for exception types and fix is operator by @manodasanW in #1682
  • Fix errors when consumers are using InternalsVisisbleTo by @manodasanW in #1688
  • Fix GetGuidSignature for event args by @manodasanW in #1692
  • Fix regression in IBindableIterator by @manodasanW in #1690
  • Rename BindableCustomProperty attribute to include Generated prefix by @manodasanW in #1691
  • Updating manifest which was forgotten when type was added by @manodasanW in #1694
  • Fix scenario where generic implementation type doesn't have type factory intialized by @manodasanW in #1693
  • Guard against potential null for RCW type by @manodasanW in #1695

Full Changelog: 2.1.0-prerelease.240722.1...2.1.0-prerelease.240801.1

CsWinRT 2.1.0-prerelease.240722.1

24 Jul 01:54
f8cb6a0
Compare
Choose a tag to compare
Pre-release

This is a prerelease version of C#/WinRT with bug fixes and improvements to our .NET AOT support that we shipped in last month's prerelease. This version requires the updated preview Windows SDK projection package from below which can be consumed by setting the following property in your C# project file:

<WindowsSdkPackageVersion>10.0.xxxxx.37-preview</WindowsSdkPackageVersion>

C#/WinRT package:
https://www.nuget.org/packages/Microsoft.Windows.CsWinRT/2.1.0-prerelease.240722.1

.NET Windows SDK targeting packages:
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.26100.37-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.37-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.37-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.37-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.37-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.37-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.37-preview

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

What's Changed

New Contributors

Full Changelog: 2.1.0-prerelease.240602.1...2.1.0-prerelease.240722.1

CsWinRT v2.0.8

11 Jul 01:50
9cf9847
Compare
Choose a tag to compare

This is a minor release with a set of fixes for reported issues since 2.0.7. This stable release doesn't have the AOT changes which are available in the preview release. An updated preview release will be coming soon.

What's Changed

New Contributors

Full Changelog: 2.0.7.240207.1...2.0.8.240703.1

CsWinRT 2.1.0-prerelease.240602.1

04 Jun 20:50
7602014
Compare
Choose a tag to compare
Pre-release

This is a prerelease version of C#/WinRT focused on bringing .NET AOT support and improved trimming support to both the runtime and generated projections. This version requires the preview Windows SDK projection package from below which can be consumed by setting the following property in your C# project file:

<WindowsSdkPackageVersion>10.0.xxxxx.35-preview</WindowsSdkPackageVersion>

C#/WinRT package:
https://www.nuget.org/packages/Microsoft.Windows.CsWinRT/2.1.0-prerelease.240602.1

.NET Windows SDK targeting packages:
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22621.35-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.35-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.35-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.35-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.35-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.35-preview

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

Thank you to @dongle-the-gadget, @Gaoyifei1011, @hez2010, @Jeremy-Price, @jlaanstra, @Sergio0694 for your community contributions to this significant release.

New Contributors

Full Changelog: 2.0.7.240207.1...2.1.0-prerelease.240602.1

CsWinRT v2.0.7

08 Feb 00:06
2b77d84
Compare
Choose a tag to compare

Minor update to address regression in 2.0.6 with respect to projected types in WinRT namespace

Changes:

  • 2b77d84 Update CsWinRT-Variables.yml (#1501)
  • 174ccbf Fix mising global:: and add test case to avoid breaking in future. (#1500)

This list of changes was auto generated.