UWP vs Desktop #724
-
I read through some of the documentation and FAQs on reunion as well as a few Channel 9 videos on WinUI 3 and project reunion. My question is on greenfield development. If I am starting to write a new app, in C#, and targeting a desktop audience, what is the recommended approach between desktop and UWP? I understand UWP's packaged and container model, but assuming those things are unimportant, does UWP continue to be the recommended approach unless my needs cannot be met with its limitations? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
I would recommend that you don’t create a UWP app — yet. The UWP app development experience is currently very crappy and prevents you from using about eight years’ worth of toolchain and library improvements. If you create a WinUI 3 desktop app, you can easily port it into UWP-land (really the CoreWindow lifecycle) once it is compatible (WinUI is currently supported in desktop apps only). You would create a WinUI 3 desktop app (using the desktop app template), put it in an MSIX package, and mark it as being a CoreWindow/AppContainer app by using code in the MSIX package manifest. This makes it run as a ”UWP app” without needing to deal with the horrible outdated UWP toolchain that Visual Studio still requires us to use. Unfortunately, there is currently a bug in VS that prevents you from easily doing this. However, that being said, if you are planning on using MSIX to distribute your program, you can instruct Windows to keep your desktop app in an AppContainer sandbox despite it being written using Win32, WPF, or other non-UWP UI stacks. (I don’t know how well you would be able to request access outside of that sandbox if you’re using this technique; I have never tried it myself.) Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
"UWP" is ill-defined, so it's hard to have a conversation without defining up front what you're referring to. But I suspect you're referring to the classic mix of appcontainer/corewindow/WinRT XAML. Microsoft no longer recommends this path, although getting this message to all its employees is... a work-in-progress. Microsoft is working on migrating folks from "UWP" + WinRT XAML to "Project Reunion" + WinUI XAML. We're still in the middle of this Great Windows Developer Migration so things are rough right now and everyone is a bit grumpy. Your options are:
There's a lot of room for nuance here, so do clarify your needs where possible and someone will point you in the right direction. |
Beta Was this translation helpful? Give feedback.
-
It is because I saw that |
Beta Was this translation helpful? Give feedback.
"UWP" is ill-defined, so it's hard to have a conversation without defining up front what you're referring to. But I suspect you're referring to the classic mix of appcontainer/corewindow/WinRT XAML. Microsoft no longer recommends this path, although getting this message to all its employees is... a work-in-progress. Microsoft is working on migrating folks from "UWP" + WinRT XAML to "Project Reunion" + WinUI XAML. We're still in the middle of this Great Windows Developer Migration so things are rough right now and everyone is a bit grumpy.
Your options are: