.NET SDK
Status
Section titled “Status”Version: 1.0.0 | Tests: Passing
{
"features": {
"ghcr.io/infrashift/trusted-devcontainer-features/dotnet:latest": {
"target_version": "8.0.418"
}
}
} Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
target_version | string | 8.0.418 | Select a supported .NET SDK version |
target_checksum | string | "" | SHA256 checksum for the .NET SDK tarball |
Dependencies
Section titled “Dependencies”None — this feature is independent and has no dependencies.
How It Works
Section titled “How It Works”This feature downloads the .NET SDK tarball from Microsoft’s official CDN for the linux-x64 architecture and installs it into a user-local directory. The .NET SDK includes the runtime, libraries, and CLI tools needed to build and run .NET applications including ASP.NET Core, Blazor, and console apps.
The Ansible playbook creates the ~/.local/share/dotnet directory, downloads the SDK tarball for the specified version, and optionally verifies the SHA256 checksum if one is provided. After extraction, the playbook configures the necessary environment variables: DOTNET_ROOT is set to point at the installation directory, and ~/.local/share/dotnet is added to PATH so that the dotnet CLI is available globally.
CLI telemetry is disabled by default via the DOTNET_CLI_TELEMETRY_OPTOUT=1 environment variable, which prevents Microsoft from collecting usage data inside your devcontainer. The VS Code C# Dev Kit extension is recommended for full IntelliSense, debugging, and project management support. This feature has no dependencies on other features and can be installed standalone.