This article combs the relationship between winui 3, project reunion and windows app SDK, and introduces in detail how to create unpacked apps supported in Windows app SDK version 1.0.
Windows App SDK 1.0
Project reunion is a unified tool set for next generation windows app development. In November 2021, when the third stable version was officially released with the version number of 1.0, the renaming department made a decisive move to welcome 2022 and windows 11 with a brand-new name windows app SDK.
After a software developer recommended uwp to migrate to the windows app SDK, there was a wave of news of “giving up” uwp. In fact, after experiencing WPF, Silverlight, uwp and other similar (XAML) UI frameworks, it is not very difficult for developers to upgrade to windows app SDK and winui 3. After all, this brings together the four ways of writing XAML. Can I give up writing code? The air suddenly filled with a happy taste
Next, let’s talk about winui 3, which cannot be bypassed in the windows app SDK. As the most core and key part of the windows app SDK, winui 3 is the native UI framework developed by the next generation of Windows desktop app, including managed c# and unmanaged c++ and Win32 API. It can be understood as the reflection and integration of a software on the development technology of desktop in the past two decades.
With the iteration of the version, the current positioning of winui 3 has changed a little compared with the previous one. Unlike winui 2, which specifically serves uwp, winui 3 does not want to be associated with uwp now.
The description of uwp support in the previous preview version has been difficult to find, which can be understood as narrowing the scope of support and focusing on make desktop great again! According to the experience of the current version, there are two points worth noting. First of all, as far as the 1.0 version is concerned, there are still some components that are quite practical in the uwp era, such as cameracaptureui, inkcanvas and printmanager, which have no substitutes. The second is the version limitation of win10 1809+. It is conceivable that for software running on win7 or even older systems, the upgrade is almost completely rewritten.
The interesting thing about windows app SDK 1.0 is that it supports unpacked apps. Unlike previous irresponsible guesses, the support for unpacked app this time is very thorough and easy to use. Unpacked app is no longer packaged and uploaded to the store through msix format, but completely returned to Exe or MSI installation mode.
Then we use vs 2022 to create a long lost exe program. In addition to vs 2022, we need to install additional windows app SDK runtime and msix packages.
After downloading and decompressing, select the corresponding installation file according to the computer environment. For example, if I am a 64 bit win11 system, I choose windowsappsdk-installer-x64. Double clicking it will automatically complete the installation.
After completing the above preparation, create a blank app, packaged (winui 3 in desktop) project in vs2022. Students who have experienced the trauma of uwp desktopbridge may find that even packaged apps do not need additional packaging template projects. The simple and single solution interface makes people feel much happier.
Then let’s right-click and select edit project file. In the project file editing window, add the windowspackagetype node and set it to none.
The last step is to select unpacked startup configuration file from the drop-down list of start debug. So far, our first exe program using the windows app SDK is ready. Click the start debug button or press F5 to run successfully.
So it’s called Siyi unpacked app. We can run it directly in the output directory or the publish directory by double clicking exe. As shown in the figure below, after successful publishing, you can copy the entire publish directory to other win10 1809+ machines to run.
The current version will contain a large number of DLL files in the pulish directory. The machine running the EXE program also needs to install the windows app SDK runtime. Vaguely, I went back to installing XP 20 years ago Net runtime scenario, history is really a reincarnation.
This is a small step for us to experience windows app SDK 1.0. At the same time, I wish this is a solid starting point for a software to build for make desktop great again, and a big step to reshape the brilliance for windows and many silent desktop developers.