Create an app with Rider
Note
Make sure to setup your environment first by following our instructions.
Create the App
Creating an Uno Platform project is done using dotnet new and the Uno Platform Live Wizard by following these steps:
Open a browser and navigate to the Live Wizard
Configure your new project by providing a project name, then click Start
Choose a template to build your application
Tip
For a detailed overview of the Uno Platform project wizard and all its options, see the Wizard guide.
Click the Create button on the top right corner, then click the Copy button
In your terminal, navigate to the folder that will contain your new app.
Create a new project by pasting the command that was previously generated in the Live Wizard.
Open the solution in Rider, you should now have a folder structure that looks like this:
Tip
If you are not able to run the online Live Wizard, you can explore the dotnet new
template directly in the CLI.
Considerations for macOS and Linux
When using macOS or Linux for developing your application and you have selected the WinAppSDK target, you may get the UNOB0014 error which mentions building on macOS or Linux is not supported. While Uno Platform is able to filter out unsupported targets from the command line and other IDE, Rider currently does not support this automatic filtering.
To correct this, you'll need to modify your csproj
file in order to make the project compatible.
You can change this line:
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041;net8.0-browserwasm;net8.0-desktop</TargetFrameworks>
To be:
<TargetFrameworks>net8.0-android;net8.0-browserwasm;net8.0-desktop</TargetFrameworks>
<TargetFrameworks Condition=" $([MSBuild]::IsOSPlatform('windows')) ">$(TargetFrameworks);net8.0-windows10.0.19041</TargetFrameworks>
<TargetFrameworks Condition=" !$([MSBuild]::IsOSPlatform('linux')) ">$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
Make sure to adjust the list of target frameworks based on the platforms you have in your original list.
Debug the App
Select the MyUnoApp (Desktop) debug profile then click the green arrow or the debug button.
Next Steps
Now that you're Created and Debug the App.
Learn more about: