Comment on page

Get Started

Install the templates

To install the templates for Fabulous for Avalonia, run the following command:
dotnet new install Fabulous.Avalonia.Templates
You can check the installed templates on your machine by running the command:
dotnet new list
You should see the installed Fabulous for Avalonia templates:
Template Name Short Name Language Tags
----------------------- ----------------- -------- -----------------
Fabulous Avalonia Blank fabulous-avalonia F# Fabulous/Avalonia

Create a project

To get started, we are going to use the simplest Fabulous for Avalonia template: Fabulous Avalonia Blank (or fabulous-avalonia in the CLI).
Run the command:
dotnet new fabulous-avalonia -n GetStartedApp
This will create a new folder called GetStartedApp containing the new project.
In this folder, you'll find a project named GetStartedApp. This project uses the single project format to target several platforms from a single codebase.
See the official Avalonia documentation for more information on the supported platforms.

Run a project

We are now ready to run the project!
Go into the GetStartedApp directory and run:
# run the Desktop app
dotnet run -f net7.0
You can also open the solution GetStartedApp.sln with your favorite IDE and select the platform you want, then press debug to deploy and run the app.
Last modified 2mo ago