Get Started on VS Code

This guide will walk you through the set-up process for building apps with Uno under Windows, Linux or macOS.

See these sections for information about using Uno Platform with:

Prerequisites

Check your environment

  1. Open a command-line prompt, Windows Terminal if you have it installed, or else Command Prompt or Windows Powershell from the Start menu.

  2. Setup uno.check by:

    • Installing the tool:

      dotnet tool install -g uno.check
      
    • Updating the tool, if you previously installed it:

      dotnet tool update -g uno.check
      
  3. Run the tool from the command prompt with the following command:

    uno-check
    
  4. Follow the instructions indicated by the tool.

You can find additional information about uno-check here.

Configure VS Code

If you are new to VS Code or to developing C# applications with VS Code take the time to follow the next steps.

  1. Open VS Code
  2. If this is not a new installation then try to update it. Press F1 and type Code: Check for Updates... and select it. A notification will tell you if an update is available.
  3. Configure VS Code to start from the command-line using the code command. This can be configured by following these instructions.
  4. Install the C# extension. Press F1 and type Extensions: Install Extensions, search the marketplace for C# and click the Install button.
  5. Install the Uno Platform extension. Press F1 and type Extensions: Install Extensions, search the marketplace for Uno Platform and click the Install button.

No other extensions are needed to complete this guide.

C# Dev Kit Compatibility

At this time, the preview version of the C# Dev Kit extension ms-dotnettools.csdevkit is not compatible with the Uno Platform extension. It requires a preview version of the C# extension ms-dotnettools.csharp that contains major breaking changes.

You can use both the Uno Platform and C# Dev Kit extensions but not simultaneously. The easiest way to accomplish this is to create profiles inside VSCode. Using this method, you can:

  1. Create one profile for Uno Platform

  2. Disable, if installed, C# Dev Kit extension

  3. Enable useOmnisharp inside the configuration useOmnisharp

  4. Create another profile for C# Dev Kit

  5. Enable (or install) the C# Dev Kit extension

  6. Ensure that useOmnisharp is disabled inside the configuration

  7. Disable the Uno Platform extension

You can then switch between both profiles according to the type of dotnet project you are developing.

Platform specific setup

You may need to follow additional directions, depending on your development environment.

In order to run Skia+GTK heads, you will need to make sure to install the GTK3 runtime.

Tip

Once the GTK3 runtime is installed, you will need restart your IDE for the changes to take effect.

Next Steps

You're all set! You can now create your first app with Uno Platform.