Avalonia
Home
Support
GitHub Repository
Searchβ¦
π
Welcome
Documentation
β‘
Getting Started
π
Data Binding
π¨
Styling
π§°
Controls
π
Templates
β
Authoring Controls
π±
Input
π
Animations
π
Layout
π¦
Distribution / Publishing
API Reference
π§Ύ
Namespaces
Guides
π£
Basics
π€Ώ
Deep dives
π©π»
π©π» Developer Guides
Tutorials
π
ToDo List App
π»
Music Store App
Running in the Browser
π±
Developing for Mobile
Create a cross platform solution
Android
iOS
Misc
πͺ
Community
π₯
WPF Developers Tips
π
Projects that are using Avalonia
β
FAQ
Powered By
GitBook
Create a cross platform solution
Create a solution compatible with Desktop, Mobile and Web
Make sure you use latest .NET 6 SDK. iOS especially requires developers to use 6.0.202 SDK or newer.
Install the Avalonia dotnet templates. Version
0.10.13
and above adds support for mobile.
1
dotnet new -i avalonia.templates
Copied!
Once the templates are installed you can generate a new project.
Create a folder name that matches the name of your project. Then enter that folder.
1
mkdir
HelloWorld
2
cd
HelloWorld
Copied!
Now create a cross platform solution using the templates.
1
dotnet new avalonia.xplat
Copied!
This will create a project with the following structure:
HelloWorld (Avalonia UI project with Views and ViewModels)
HelloWorld.Android (Avalonia bootstrap code for Android)
HelloWorld.Desktop (Avalonia bootstrap code for Desktop - Window, MacOS and Linux)
HelloWorld.iOS (Avalonia bootstrap code for iOS)
HelloWorld.Web (Avalonia bootstrap code for Web)
nuget.config (gives access to nightly builds of Avalonia)
global.json (forces use of latest sdk)
Directory.Build.props (sets the Avalonia version your application will target)
HelloWorld.sln (the solution file if you use an IDE)
Now continue to:
β
Setting up your developer environment for iOS
or
Setting up your developer environment for Android
β
Tutorials - Previous
Developing for Mobile
Next
Android
Last modified
1mo ago
Export as PDF
Copy link
Edit on GitHub