A development environment for .NET projects. It provides the .NET
toolchain via a versioned content snap, persists NuGet packages and
.NET runtime data on the host to speed up builds across workshop updates,
and gives you standard dotnet CLI commands for building, testing, and running
your applications. Multiple .NET versions are available via separate channels
(e.g. 8/stable, 9/stable, 10/stable).
A minimal workshop:
# workshop.yaml
name: dotnet-app
base: ubuntu@24.04
sdks:
- name: dotnet
channel: 8/stable
actions:
build: |
dotnet build
test: |
dotnet testThis demonstrates a basic .NET build workflow with persistent NuGet caching.
-
No prerequisite SDKs are required.
-
Your .NET project (with a
.csprojor.slnfile) should be in your project directory:git clone <YOUR_REPO_URL>
-
On launch, the SDK configures
PATH. No dependencies are pre-installed; NuGet packages are downloaded during the firstdotnet buildordotnet restore.
Once the workshop is ready:
workshop shell
dotnet buildThe first build downloads NuGet packages into ~/.nuget, which is mapped to
your host via the nuget-cache mount plug. Subsequent builds reuse cached
packages.
To see where the NuGet cache is stored on the host:
workshop infoFrom within the workshop shell:
workshop shell
dotnet test
dotnet runUse standard dotnet commands; the toolchain behaves exactly as it would in a
regular .NET installation.
- Interface:
mount - Workshop target:
/home/workshop/.nuget - Purpose: Persists NuGet package downloads between workshop updates.
- Interface:
mount - Workshop target:
/home/workshop/.dotnet - Purpose: Persists .NET tools and runtime data between workshop updates.
This SDK doesn't define any slots.
- .NET community: .NET Community Forum
- Workshop forum: Discourse
- Please review our Code of Conduct before participating.
All contributions, including code, documentation updates, and issue reports, are welcome!
- See
CONTRIBUTING.mdfor guidelines. - Open issues or pull requests on the official repository.
Copyright 2025 Canonical Ltd.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 (LGPLv2.1) as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
The .NET runtime and SDK are licensed under Apache License 2.0.