• Thu. Sep 19th, 2024

Bringing Universal Windows Platform apps to .NET 9

Byadmin

Sep 19, 2024



Microsoft would certainly like you to update your code to the latest version of the .NET stack, but it’s keenly aware of the difficulties. What’s needed is a way to take that existing code and run it on the latest .NET, changing what you can as you have the time and resources. That’s why it’s launched a set of tools to add UWP support to the upcoming .NET 9.

UWP support for .NET 9 isn’t a “one button” solution. Instead, it’s a mix of tools that work at different layers of the .NET development stack, in Visual Studio, in the Windows SDK, and in .NET itself. Together they provide the necessary scaffolding to bring across your existing C# code and start the migration process to the Windows App SDK, while still letting your users see some of the advantages of a more modern platform. Updates to newer technologies can be incremental, for example, developing a Win UI user experience while retaining some functionality in XAML Islands. As a result you’re actually taking advantage of a public release of tools that Microsoft is using for its own app updates, with the Microsoft Store working with these tools to deliver a native AOT version in the near future—most likely in November, after .NET 9 reaches general availability and gets support.

There’s another good reason to use this tool: It removes dependencies on the old .NET Native tooling. .NET Native reduced access to newer .NET features, as it hasn’t been updated beyond .NET Core 2.0 and .NET Standard 2.0. This change should allow you to add newer libraries to your code, giving access to a wider range of both .NET and Windows features.



Source link