Windows
Windows
Today is the official GA release for .NET 5, and along with it we are excited to share the latest updates with our recent release of . C#/WinRT provides WinRT projection support for .NET 5 based apps. The Windows SDK leverages this technology and is now integrated with the .NET 5.0 SDK to expose Windows APIs through the new . In addition to the Windows SDK support added for .NET 5, C#/WinRT itself allows component authors to build their own .NET 5 projections using the To use the latest runtime and SDK updates in .NET 5, install the following:
net5.0-windows10.0.19041.0
For more details on how to use Windows TFMs in your app, check out the blog post on as well as the for Windows desktop apps.
Call Windows APIs with new TFMs in .NET 5
C#/WinRT provides support for WinRT APIs in .NET 5 by generating Windows SDK projections and including them in the .NET 5.0 SDK along with a small runtime assembly. With this new support, Windows APIs should now be accessed using the new feature. The new TFMs provide a simple and streamlined access to the Windows APIs in a .NET 5 app. The following TFMs and corresponding SDK versions are supported:- 0-windows10.0.17763.0 (Windows 10, version 1809)
- 0-windows10.0.18362.0 (Windows 10, version 1903)
- 0-windows10.0.19041.0 (Windows 10, version 2004)
net5.0-windows10.0.19041.0
For more details on how to use Windows TFMs in your app, check out the blog post on as well as the for Windows desktop apps.
Latest Windows Runtime Updates
Version 1.0 of C#/WinRT includes the latest runtime updates that are shipped through our runtime assembly, winrt.runtime.dll, as part of the .NET 5.0 SDK. The runtime assembly and the Windows SDK projections are accessed through the .NET 5 TFMs mentioned above. Some of the latest .NET 5 features we have added include C# function pointers for improved performance and implementing natural C#-style casts. To learn more about these updates, take a look at the blog post on . We have made performance improvements and fixed several critical bugs raised by the team as well as from developer feedback through our repo. Some of these fixes include:- Added projection support for ref const C# parameters
- Fixes for NullReferenceExceptions when using C# IDictionary objects
- Resolved issues with using WindowsRuntimeBufferExtensions methods
- Several bug-fixes involving InvalidCastExceptions