Creating an app with Visual Studio 2022 for Windows

Note

Make sure to setup your environment by following our instructions.

Create the App

To create an Uno Platform app:

  1. Create a new C# solution using the Uno Platform App template, from Visual Studio's Start Page, then click the Next button

    Visual Studio - Get started - Selecting create a new project option
    Visual Studio - Create a new project - Selecting Uno Platform App option

  2. Configure your new project by providing a project name and a location, check the "Place solution and project in the same directory" option, then click the Create button

    Visual Studio - Configure project name and location

  3. Choose a template to build your application

    Visual Studio - Configure your new project

    Tip

    For a detailed overview of the Uno Platform project template wizard and all its options, see this.

  4. Click the create button

  5. Wait for the projects to be created, and their dependencies to be restored

  6. A banner at the top of the editor may ask to reload projects, click Reload projects:
    Visual Studio - A banner indicating to reload projects

Debug the App

To run the Windows (WinAppSDK) head:

  • Right-click on the MyApp.Windows project, select Set as startup project
  • Select the Debug|x86 configuration
  • Press the MyApp.Windows button to deploy the app
  • If you've not enabled Developer Mode, the Settings app should open to the appropriate page. Turn on Developer Mode and accept the disclaimer.

You're all set!

Important

Take a look at our article in order to ensure that your solution is building and showing intellisense as fast as possible, and to avoid this Visual Studio issue (help the community by upvoting it!) where multi-targeted project libraries always build their full set of targets.

Next Steps

Now that you're Created and Debug the App.

Learn more about: