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 Uno Platform extension. Press F1 and type Extensions: Install Extensions, search the marketplace for Uno Platform and click the Install button.

OmniSharp Legacy Mode

Starting Uno Platform extension version 0.12, running in VS Code automatically uses the C# Dev Kit extension ms-dotnettools.csdevkit.

If you are using GitPod, any Open VSX environment or earlier versions of the Uno Platform extension, you will be automatically using the C# extension ms-dotnettools.csharp with OmniSharp enabled.

To switch between C# Dev Kit and OmniSharp:

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.

To install on CI using Azure Pipelines, use the following step:

steps:
  - powershell: |
        $source = "https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/download/2020-07-15/gtk3-runtime-3.24.20-2020-07-15-ts-win64.exe"
        $destination = "gtk3-runtime.exe"
        Invoke-WebRequest $source -OutFile $destination
        Start-Process -FilePath "gtk3-runtime.exe" -Wait -PassThru -ArgumentList /S
        Write-Host "##vso[task.setvariable variable=PATH;]${env:PATH};C:\Program Files\GTK3-Runtime Win64\bin";

    displayName: Install GTK3 runtime

Next Steps

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