Adding Platforms to an Existing Project
If you have an existing Uno Platform project, and you have not selected all the platforms you need when creating the project, this guide will show you how to add new ones.
Considering that your project is called MyProject
, and you want to add the desktop
target support:
- In a separate temporary folder, create a new project using the Visual Studio 2022 or
dotnet new
templates, usingMyProject
for its name. - Unselect all platforms except
Desktop
in the platforms selection dialog. - Make sure to select the template preset and features.
- Once the project has been created, navigate to the new folder
MyProject
. - Copy
Platforms/Desktop
folder to the existing project structure, at the same level as the other platform folders. - In your
.csproj
, add thenet8.0-desktop
target framework to theTargetFrameworks
property. - Save your solution.
Your new platform project is now ready to be compiled.
You can repeat a similar process for net8.0-ios
, net8.0-android
, net8.0-maccatalyst
, net8.0-browserwasm
and net8.0-windows10.0.19041
.