Get Started on Visual Studio 2019 for Xamarin
Prerequisites
- Visual Studio 2019 16.3 or later, with:
Universal Windows Platform workload installed.
All Windows SDKS 10.0.17763 or later must be selected (on the right side of the installer)
Mobile development with .NET (Xamarin) workload installed.
- The iOS Remote Simulator installed (for iOS development)
- A working Mac with Visual Studio for Mac, Xcode 8.2 or later installed (for iOS development)
- Google's Android x86 emulators or a physical Android device (for Android development)
ASP.NET and web workload installed, along with .NET 5.0 or 6.0 (for WebAssembly development)
.NET SDK
- .NET 5.0 SDK (SDK 5.0.400 or later)
Note
For more information about these prerequisites, see Installing Xamarin. For information about connecting Visual Studio to a Mac build host, see Pair to Mac for Xamarin.iOS development.
Finalize your environment
Open a command-line prompt, Windows Terminal if you have it installed, or else Command Prompt or Windows Powershell from the Start menu.
a. Install the tool by running the following command from the command prompt:
dotnet tool install -g uno.check
b. To update the tool, if you already have an existing one:
dotnet tool update -g uno.check
Run the tool from the command prompt with the following command:
uno-check
Follow the instructions indicated by the tool
Note
Alternatively you can run uno-check --pre
to install the preview version of the Uno Platform. This is strongly suggested when using Visual Studio Previews.
You can find additional information about uno-check here.
Installing the Uno Platform Solution Templates with Visual Studio
Launch Visual Studio, then click
Continue without code
. ClickExtensions
->Manage Extensions
from the Menu Bar.In the Extension Manager expand the Online node and search for
Uno Platform Templates
, install theUno Platform Solution Templates
extension or download it from the Visual Studio Marketplace extension, then restart Visual Studio.
Create an application from the solution template
To easily create a multi-platform application:
- Create a new C# solution using the Uno Platform App (Xamarin|UWP) template, from Visual Studio's Start Page:
- Right-click on the Solution and select
Manage NuGet Packages for Solution
from the context menu. - Update to the latest NuGet package named
Uno.UI
. - To debug the iOS head, select the
Debug|iPhoneSimulator
configuration - To debug the Android head, select the
Debug|Any CPU
configuration - To debug the UWP head, select the
Debug|x86
configuration - To run the WebAssembly (Wasm) head, select IIS Express and press Ctrl+F5 or choose
Start without debugging
from the Debug menu. To enable full debugging, see these debugging instructions.
You're all set! You can now head to our tutorials on how to work on your Uno Platform app.
Make sure XAML Intellisense is enabled
Intellisense is supported in XAML when the UWP head is active:
If XAML Intellisense isn't working on a freshly-created project, try the following steps:
- Build the UWP head.
- Close all XAML documents.
- Close and reopen Visual Studio.
- Reopen XAML documents.
Troubleshooting Visual Studio and Uno Platform Installation Issues
You may encounter installation and/or post-installation Visual Studio issues for which workarounds exist. Please see Common Issues we have documented.
If you're not sure whether your environment is correctly configured for Uno Platform development, running the uno-check
command-line tool should be your first step.
Getting Help
If you continue experiencing issues with Uno Platform, please visit our GitHub Discussions or Discord - #uno-platform channel where our engineering team and community will be able to help you.