Search code examples
.netuwpwindows-runtime

UWP and recent versions of .Net (6, 8)


One of the Microsoft technologies is UWP - Universal Windows Platform. It looks like it is still maintained, but it is not based on recent versions of .Net. Does anybody know why? What is the problem there?

Why at all they do not have them together? Is there any way to use classes from UWP in a .Net8 app?

There are similar questions on this subject:

But they are very old. I cannot find a more recent ones. So, I am asking again since considerable time has passed since then.

An example of why this is important is the Bluetooth support. It is present in WinRT, but not in .Net8. Proper understanding of relation between these technologies may help to find an answer on how to make a Bluetooth capable app in Windows using right and recent technologies.


Solution

  • If you want to be able to use the latest .NET features in a Windows Desktop GUI app, the recommended approach is to migrate to WinUI 3. Or use WPF or Windows Forms. UWP projects don't not support .NET 5 and later versions and never will: https://developercommunity.visualstudio.com/t/Add-NET-678-support-to-UWP/1596483

    When it comes to the native Windows Runtime APIs, you can still use these in .NET and any other type of desktop apps on Windows. Please refer to the docs for more information and examples of how to do this.