Get started developing apps with Project Reunion

After you set up your development environment, you're ready to start developing with Project Reunion. This article provides instructions about using Project Reunion in new or existing projects.

Create a new project that uses Project Reunion

If you created a project with an earlier preview or release version of Project Reunion or WinUI 3, see Update existing projects to the latest release of Project Reunion for instructions on updating to the latest version.

Note

The desktop (C#/.NET 5 and C++/WinRT) project templates included in the stable release channel of Project Reunion are supported for use in production environments. The UWP and other project templates included in the preview release channel Project Reunion (Preview) extension are available as a developer preview only, and should not be used to build apps for production environments.

To create a new project that uses Project Reunion:

  1. Follow the instructions in the following articles:

    Note

    If you create a C#/.NET 5 project, make sure that your project's .NET SDK references are up to date using these instructions.

  2. After you create your project, you have access to the Project Reunion APIs and components in addition to all other Windows and .NET APIs that are typically available to desktop and UWP apps. For more information about the available APIs and components, see stable release channel and preview release channel.

To confirm that your new project uses Project Reunion, expand the Dependencies > Packages node under your project in Solution Explorer. You should see several Microsoft.ProjectReunion packages listed under this node, similar to the following image.

Screenshot of Project Reunion packages in Solution Explorer pane

Use Project Reunion in an existing project

If you have an existing project in which you want to use Project Reunion, you can install the latest stable or latest preview version of the Project Reunion NuGet package in your project. This scenario has some limitations.

  1. Open an existing desktop project (either C#/.NET 5 or C++/WinRT) or UWP project in Visual Studio 2019.

    Note

    If you have a C#/.NET 5 desktop project, make sure the TargetFramework element in the project file is assigned to a Windows 10-specific .NET 5 moniker, such as net5.0-windows10.0.19041.0, so that it can call Windows Runtime APIs. For more information, see this section.

  2. Make sure package references are enabled:

    1. In Visual Studio, click Tools -> NuGet Package Manager -> Package Manager Settings.
    2. Make sure PackageReference is selected for Default package management format.
  3. Right-click your project in Solution Explorer and choose Manage NuGet Packages.

  4. In the NuGet Package Manager window, select the Browse tab and search for Microsoft.ProjectReunion.

  5. After the Microsoft.ProjectReunion package is found, in the right pane of the NuGet Package Manager window click Install.

    Screenshot of Project Reunion NuGet package being installed

  6. For C#/.NET 5 projects only: In order to receive all of the fixes from the latest stable release of Project Reunion 0.5, you'll need to update your project file to explicitly set your .NET SDK to the latest version. For more information, see .NET SDK references.

  7. After you install the Microsoft.ProjectReunion package, you can use the following Project Reunion APIs and components in your project:

Samples

The following Project Reunion samples are currently available for you to explore.

Note

These samples currently support Project Reunion version 0.5. New and updated samples for Project Reunion version 0.8 Preview are coming soon.