Create a new WinUI 3 and Uno Platform app
Uno Platform apps can be created in both UWP-compatible (
Windows.UI.Xaml, also known as WUX) and WinUI 3-compatible (
Microsoft.UI.Xaml, also known as MUX) flavors. In the latter case, you can use the latest features of .NET 5 and WindowsAppSDK (formerly known as "Project Reunion") for WinUI 3 Desktop apps. This article takes you through the steps of creating a WinUI 3-flavored Uno Platform app and running the app with WindowsAppSDK for Desktop.
- Visual Studio 2019 16.10 preview 1 or higher (for Live Visual Tree, Live Property Explorer and XAML Hot Reload), with following workloads installed:
- Universal Windows Platform development
- .NET desktop development
- .NET SDK (.NET 5 or higher)
Set up your environment
- Install the Uno Platform dotnet templates. From a command-line prompt, run the following command:
dotnet new -i Uno.ProjectTemplates.Dotnet
Create a new app
- Create a folder for your app.
- From a command-line prompt at that folder location, run the following command:
dotnet new unoapp-winui -o MyUnoApp
- Open the solution file you created.
- UI Tooling features (Live Visual Tree, Live Property Explorer, and Hot Reload) for WinUI 3 need to be enabled in Visual Studio as a Preview Feature. Navigate to
Tools -> Options -> Environment -> Preview Featuresand toggle "Enable UI Debugging Tooling for WinUI 3 Projects".
- To debug the WinUI 3 Desktop project, set
[MyAppName].Windows.Packageas the startup project, set the Solution Platform to
x86, and run the application.