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:
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 macOSAndroid
contains files and assets specific to Android Phones, Tablets, TVs, and watchesiOS
targets Apple's iOS devices, Phones and TabletsMacCatalyst
targets the macOS Catalyst platformWebAssembly
targets the browser using WebAssemblyWindows
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
andApp.xaml.cs
are the common entry point for the app. The generic app setup runtime code generally goes here.MainPage.xaml
andMainPage.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 fornet8.0-desktop
andnet8.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:
global.json
contains the .NET SDK configuration as well as the Uno.Sdk version to use. See our documentation on how to update it.Directory.Build.props
andDirectory.Build.targets
contain common solution configurations applied to all projects.Directory.Packages.props
contains the NuGet Central Package Management package versions.
Further information
See additional guides on handling platform-specific C# code and XAML markup in an Uno Platform project.
Next Steps
Learn more about:
- Uno Platform features and architecture
- Hot Reload feature
- Troubleshooting
- List of views implemented in Uno for the set of available controls and their properties.
- You can head to How-tos and tutorials on how to work on your Uno Platform app.