Skip to content

CsWinRT v1.4.0-prerelease.211028.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@Scottj1s Scottj1s released this 02 Nov 22:44
fee2cb9

Release Notes

This is a prerelease version of C#/WinRT focused on performance improvements to the runtime and projection code. The preview Windows SDK packages below can be consumed by setting the following property in your C# project file:

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

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

.NET Windows SDK targeting packages:
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.22000.22-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.20348.22-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.19041.22-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.18362.22-preview
https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref/10.0.17763.22-preview

Breaking changes

This version of C#/WinRT includes AssemblyVersion changes in both the runtime and generated Windows SDK projection assemblies:

  • WinRT.Runtime.dll: AssemblyVersion incremented from 1.3.0.0 to 1.4.0.0
  • Microsoft.Windows.SDK.NET.dll: AssemblyVersion incremented from 10.0.xxxxx.21 to 10.0.xxxxx.22

The AssemblyVersion changes are due to the fact that this version of C#/WinRT generates new helper methods for non-exclusive interfaces which are consumed by the generated code of a type implementing that interface. The impact of the AssemblyVersion changes is that components/projections that are built using this version of C#/WinRT and that implement interfaces from another projection (e.g., the Windows SDK or WinUI projection) will need an updated version of the other projection built using this version of C#/WinRT. Otherwise, you may see errors similar to the following:

Error CS0234: The type or namespace name 'IGraphicsEffectMethods' does not exist in the namespace 'ABI.Windows.Graphics.Effects' (are you missing an assembly reference?)

Performance improvements

  • Minimize usage of IDynamicInterfaceCastable: Improves performance in RCW function calls and reduces number of objects being created (#1015)
  • Optimize activation factory caching to always pin for life of the process (#1021)
  • Reduce cost of subscribing to events (#1027)
  • Initialize generic marshaller helper functions lazily to reduce reflection code (#1001)
  • Minimize Lazy<> usage and replace with Interlocked.CompareExchange (#1014)
  • Reduce redundant activation factory lookup (#1001)
  • Lazy creation of concurrent dictionaries (#1001)
  • Improve activation for string operations and dictionaries (#1006)
  • Cache IsWindowsRuntimeType (type marshalling improvements) (#1005)
  • CreateObject microbenchmark optimizations (reduce time spent during RCW creation and improvements in drawing) (#1010)
  • Dictionary lookup caching (#1033)

Bug fixes

  • Issue fixed where second event handler not called (#626)

Changes:

  • fee2cb9 Dictionary lookup caching (#1033)
  • ad77248 Refactor Lazy<> uses (#1014)
  • 5fac5ad Update .NET SDK versions (#1030)
  • b8d4b5e Improvements to subscribing to events (#1027)
  • db7a841 Fix the FastUpToDateCheck relationship between WinRT.cs and the inputs winmds. (#1026)
  • 7dc015e Merge pull request #1015 from microsoft/ujjwalchadha/minimize_idic_usage
  • 298ae4b cleanup
  • 2378340 Merged master
  • 4427779 Update nuspec tags and description
  • 86f37b7 Make activation factories not weak and reduce duplicate retrieval of activation factories (#1021)
See More
  • d2fb501 Fix private class methods
  • 375b8b9 Use targetframework property function (#1012)
  • 51a2183 Ensure AssemblyAttributes.cs file is generated with correct TargetFrameworkAttribute (#1020)
  • ee17bea Bump TestWinRT version (#1019)
  • 41beec2 Fix build with VS2022 (#1017)
  • 4035ab8 Convert activation and error info delegates to function pointers (#1018)
  • a32c457 CreateObject microbenchmark optimizations (#1010)
  • 66f4c01 Merge branch 'master' into ujjwalchadha/minimize_idic_usage
  • 0b13794 Refactor code_writers
  • ffb3267 projection code cleanup
  • 625f534 Remove idic use from static classes
  • e8a806d Call static methods from classes
  • bd25372 Cache IsWindowsRuntimeType, which is expensive to read custom attributes (#1005)
  • 565de2f CompareOrdinal all the things - string operations and dictionaries (#1006)
  • 7c2667b Move abi calls to static classes
  • a69a7ed Handle case where event source may remove event and any other added events don't fire (#997)
  • 54c6bfc Perf improvements (#1001)
  • c927df0 fixed a few assumptions regarding nuget cache (#1002)

This list of changes was auto generated.

New Contributors

Full Changelog: 1.2.4...1.4.0-prerelease.211028.1