Using Gitpod

Developing an Uno App using Gitpod

The easiest way to get started is to visit the Uno.QuickStart repository. It allows you to get started with minimal configuration or project creation steps.

Creating the environment from scratch

If you want to start from an empty repository, follow these steps:

  1. Create an empty repository
  2. Create a file named .gitpod.yml at the root of the repository, and set it to the following
      file: .gitpod.Dockerfile
      # Mitigation for 
      - name: Postinstall .NET 6.0 and dev certificates
        init: |
          mkdir -p $DOTNET_ROOT && curl -fsSL | bash /dev/stdin --channel $DOTNET_VERSION --install-dir $DOTNET_ROOT 
          dotnet dev-certs https 
  3. Create a file named .gitpod.Dockerfile, with the following content:
    FROM gitpod/workspace-dotnet-vnc
    USER gitpod
    #.NET installed via .gitpod.yml task until the following issue is fixed:
    ENV DOTNET_ROOT=/workspace/.dotnet
  4. Commit these changes and open a GitPod workspace
  5. Install the unoplatform.vscode extension from OpenVSX
  6. Open the command palette (Ctrl+Shift+P) and run the Install the dotnet new templates command to install the dotnet new templates
  7. Create a new project using the following command:
    dotnet new unoapp -o MyApp -ios=false -android=false -macos=false -skia-tizen=false -skia-wpf=false -skia-linux-fb=false --vscode
  8. Using the Gitpod top left menu, open the MyApp folder

You're ready to develop for WebAssembly or the Linux desktop (Skia+Gtk).

Contributing to Uno using Gitpod

To contribute to Uno using GitPod:

  1. Open Uno in Gitpod
  2. In the opened shell, type the following to build the Uno solution:
    The build should end without any errors
  3. If you want to enable XAML Hot Reload, open another shell, then run:
  4. Open another shell, then start the Uno http server:

Once the server is started, Gitpod will automatically open a browser window on the side to show the sample application.

You can make your changes in XAML directly, to view the changes through Hot Reload. If you make changes in the code, you'll need to rerun the script, then refresh the browser section on the side.

Once you're done with your changes, make a Pull Request through the Gitpod's GitHub integration and let us know about it on our Discord Channel #uno-platform!