How to set up an C# Markup project for Toolkit
UnoFeatures:
CSharpMarkup(add to<UnoFeatures>in your.csproj)
In this tutorial, you'll learn how to set up an Uno Platform project to use C# Markup.
Make sure your environment is set up properly by using uno check.
You can create a Uno App by either using the Uno Platform Visual Studio extension or via the command line interface.
Using Visual Studio 2022 Uno Platform Extension
Open the Visual Studio and select Extensions => Manage Extensions and Search (Ctrl + E) for unoplatform.
Make sure you have the latest version of Uno Extension (v5.0 or higher) installed.

Press Ctrl+Shift+N to create a new project and select "Uno Platform App".
Give your project an appropriate name (
MySampleToolkitProjectin this page).When prompted Select Blank and click Customize

In the Markup tab (4rd one), select C# Markup.

In the Features tab (7rd one), select Toolkit.

Click Create on the bottom right corner.
Toolkit References
Note: The recommended way to add Toolkit to your project is using the
ToolkitUnoFeature in your .csproj file.
Looking in detail at the projects with the addition of the Toolkit, we can see the addition of some additional references.
This shows what happens when you enable the Toolkit UnoFeature, which automatically adds the necessary package references.
When using the Toolkit UnoFeature, the following packages are automatically included:
Package versions in Directory.Packages.props:
<PackageVersion Include="Uno.Toolkit.WinUI" Version="0.0.0" /> <PackageVersion Include="Uno.Toolkit.WinUI.Markup" Version="0.0.0" />Package references added to the following projects:
- PROJECT_NAME.Wasm.csproj
- PROJECT_NAME.Mobile.csproj (or PROJECT_NAME.iOS.csproj, PROJECT_NAME.Droid.csproj, PROJECT_NAME.macOS.csproj if you have an existing project)
- PROJECT_NAME.Skia.Gtk.csproj
- PROJECT_NAME.Windows.csproj (or PROJECT_NAME.UWP.csproj for existing projects)
<PackageReference Include="Uno.Toolkit.WinUI.Markup" />
The UnoFeature automatically chooses:
- The Uno.Toolkit.UI package when targeting Xamarin/UWP
- The Uno.Toolkit.WinUI package when targeting net6.0+/WinUI