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:
- Create an empty repository
- Create a file named
.gitpod.ymlat the root of the repository, and set it to the following
image: file: .gitpod.Dockerfile tasks: # Mitigation for https://github.com/gitpod-io/gitpod/issues/6460 - name: Postinstall .NET 6.0 and dev certificates init: | mkdir -p $DOTNET_ROOT && curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel $DOTNET_VERSION --install-dir $DOTNET_ROOT dotnet dev-certs https
- 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: https://github.com/gitpod-io/gitpod/issues/5090 ENV DOTNET_VERSION=6.0 ENV DOTNET_ROOT=/workspace/.dotnet ENV PATH=$DOTNET_ROOT:$PATH
- Commit these changes and open a GitPod workspace
- Install the
unoplatform.vscodeextension from OpenVSX
- Open the command palette (Ctrl+Shift+P) and run the
Install the dotnet new templatescommand to install the dotnet new templates
- 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
- Using the Gitpod top left menu, open the
You're ready to develop for WebAssembly or the Linux desktop (Skia+Gtk).
Contributing to Uno using Gitpod
To contribute to Uno using GitPod:
- In the opened shell, type the following to build the Uno solution:
The build should end without any errors
- If you want to enable XAML Hot Reload, open another shell, then run:
- 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
build-wasm.sh 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!