Solution Structure

This guide briefly explains the structure of an app created with either the dotnet new unoapp template or the Uno Platform Template Wizard. It is particularly aimed at developers who have not worked with cross-platform codebases before.

The project files in an Uno Platform app

After creating a new solution called MyApp, it will contain the following project:

Uno Platform solution structure

The MyApp.csproj project supports Mobile (iOS/Android/Mac Catalyst), WebAssembly, Desktop (native macOS, Linux X11/Framebuffer, Windows 7+), and Windows App SDK targets.

You'll find below details about the contents of the solution.

Platforms

The Platforms folder contains platform specific files for targets supported by Uno Platform:

  • Desktop uses the Uno Platform Skia Desktop support for Windows 7+, Linux, and macOS
  • Android contains files and assets specific to Android Phones, Tablets, TVs, and watches
  • iOS targets Apple's iOS devices, Phones and Tablets
  • MacCatalyst targets the macOS Catalyst platform
  • WebAssembly targets the browser using WebAssembly
  • Windows targets the Windows App SDK to run on Windows

Properties

This folder contains the debug profile configuration. This is used to choose where to debug your Skia Desktop app (Local Windows or WSL), the Web Server for your WebAssembly app, or Package and Unpackaged modes for Windows App SDK.

Assets

This folder contains all the assets (images, splash screens, data, ...) that are published as part of the app.

Other project files

  • App.xaml and App.xaml.cs are the common entry point for the app. The generic app setup runtime code generally goes here.
  • MainPage.xaml and MainPage.xaml.cs contain the main UI of the app.
  • GlobalUsings.cs contains the global usings define for the project.
  • app.manifest contains Windows specific configuration for net8.0-desktop and net8.0-windows targets.
  • Package.appxmanifest contains metadata about the application such as the app name and description.

Solution items

This solution folder contains the configuration for the whole solution:

Further information

See additional guides on handling platform-specific C# code and XAML markup in an Uno Platform project.

Next Steps

Learn more about: