Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
"build-essential",
"cypress-deps",
"docker-out",
"dotnet",
"eclipse-deps",
"git-lfs",
"gitlab-cli",
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Below is a list with included features, click on the link for more details.
| [build-essential](./features/src/build-essential/README.md) | Installs build essentials like gcc. |
| [cypress-deps](./features/src/cypress-deps/README.md) | Installs all dependencies required to run Cypress. |
| [docker-out](./features/src/docker-out/README.md) | Installs a Docker client which re-uses the host Docker socket. |
| [dotnet](./features/src/dotnet/README.md) | A package which installs .NET SDKs, runtimes and workloads. |
| [eclipse-deps](./features/src/eclipse-deps/README.md) | Installs all dependencies required to run the Eclipse IDE. |
| [git-lfs](./features/src/git-lfs/README.md) | Installs Git LFS. |
| [gitlab-cli](./features/src/gitlab-cli/README.md) | Installs the GitLab CLI. |
Expand Down
5 changes: 5 additions & 0 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func init() {
gotaskr.Task("Feature:docker-out:Test", func() error { return testFeature("docker-out") })
gotaskr.Task("Feature:docker-out:Publish", func() error { return publishFeature("docker-out") })

////////// dotnet
gotaskr.Task("Feature:dotnet:Package", func() error { return packageFeature("dotnet") })
gotaskr.Task("Feature:dotnet:Test", func() error { return testFeature("dotnet") })
gotaskr.Task("Feature:dotnet:Publish", func() error { return publishFeature("dotnet") })

////////// eclipse-deps
gotaskr.Task("Feature:eclipse-deps:Package", func() error { return packageFeature("eclipse-deps") })
gotaskr.Task("Feature:eclipse-deps:Test", func() error { return testFeature("eclipse-deps") })
Expand Down
33 changes: 33 additions & 0 deletions features/src/dotnet/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Dotnet Tools

If you need additional tools for example like the Powerapps CLI you can install them using `dotnet tool install --create-manifest-if-needed <Tool>`.
This installs the tool creates a manifest file: `.config/dotnet-tools.json`.

```json
{
"version": 1,
"isRoot": true,
"tools": {
"microsoft.powerapps.cli.tool": {
"version": "1.43.6",
"commands": [
"pac"
],
"rollForward": false
}
}
}
```

After this step, the tool can be invoked using `dotnet <command>`.

If you already have a manifest, all tools can be installed using `dotnet tool restore`.

To do that automatically, include the command in your `devcontainer.json` like this:
```json
"postCreateCommand": "dotnet tool restore"
```

### System Compatibility

Debian, Ubuntu, Alpine
73 changes: 73 additions & 0 deletions features/src/dotnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# .NET (dotnet)

A package which installs .NET SDKs, runtimes and workloads.

## Example Usage

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/dotnet:0.1.0": {
"version": "10.0",
"additionalVersions": "",
"dotnetRuntimeVersions": "",
"aspNetCoreRuntimeVersions": "",
"workloads": "",
"downloadUrl": "",
"versionsUrl": "",
"nugetConfigPath": ""
}
}
```

## Options

| Option | Description | Type | Default Value | Proposals |
|-----|-----|-----|-----|-----|
| version | Select or enter a .NET SDK version. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | 10.0 | lts, none, 8.0, 9.0, 10.0, 8.0.408 |
| additionalVersions | Enter additional .NET SDK versions, separated by commas. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | &lt;empty&gt; | 8.0,9.0, 8.0.408 |
| dotnetRuntimeVersions | Enter additional .NET runtime versions, separated by commas. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | &lt;empty&gt; | 8.0.15, 9.0, lts, 8.0 |
| aspNetCoreRuntimeVersions | Enter additional ASP.NET Core runtime versions, separated by commas. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version. | string | &lt;empty&gt; | 8.0.15, lts, 8.0 |
| workloads | Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install. | string | &lt;empty&gt; | wasm-tools, android, macos |
| downloadUrl | The download URL to use for Dotnet binaries. | string | &lt;empty&gt; | |
| versionsUrl | The URL to use for fetching available Dotnet versions. | string | &lt;empty&gt; | |
| nugetConfigPath | Path to a NuGet.Config file to copy into the container. This can be used to configure private package sources for the dotnet CLI. | string | &lt;empty&gt; | |

## Customizations

### VS Code Extensions

- `ms-dotnettools.csharp`

## Dotnet Tools

If you need additional tools for example like the Powerapps CLI you can install them using `dotnet tool install --create-manifest-if-needed <Tool>`.
This installs the tool creates a manifest file: `.config/dotnet-tools.json`.

```json
{
"version": 1,
"isRoot": true,
"tools": {
"microsoft.powerapps.cli.tool": {
"version": "1.43.6",
"commands": [
"pac"
],
"rollForward": false
}
}
}
```

After this step, the tool can be invoked using `dotnet <command>`.

If you already have a manifest, all tools can be installed using `dotnet tool restore`.

To do that automatically, include the command in your `devcontainer.json` like this:
```json
"postCreateCommand": "dotnet tool restore"
```

### System Compatibility

Debian, Ubuntu, Alpine
87 changes: 87 additions & 0 deletions features/src/dotnet/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"id": "dotnet",
"version": "0.1.0",
"name": ".NET",
"description": "A package which installs .NET SDKs, runtimes and workloads.",
"options": {
"version": {
"type": "string",
"proposals": [
"lts",
"none",
"8.0",
"9.0",
"10.0",
"8.0.408"
],
"default": "10.0",
"description": "Select or enter a .NET SDK version. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version."
},
"additionalVersions": {
"type": "string",
"default": "",
"description": "Enter additional .NET SDK versions, separated by commas. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version.",
"proposals": [
"8.0,9.0",
"8.0.408"
]
},
"dotnetRuntimeVersions": {
"type": "string",
"default": "",
"description": "Enter additional .NET runtime versions, separated by commas. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version.",
"proposals": [
"8.0.15",
"9.0",
"lts, 8.0"
]
},
"aspNetCoreRuntimeVersions": {
"type": "string",
"default": "",
"description": "Enter additional ASP.NET Core runtime versions, separated by commas. Use 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version.",
"proposals": [
"8.0.15",
"lts, 8.0"
]
},
"workloads": {
"type": "string",
"default": "",
"description": "Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install.",
"proposals": [
"wasm-tools",
"android, macos"
]
},
"downloadUrl": {
"type": "string",
"default": "",
"description": "The download URL to use for Dotnet binaries."
},
"versionsUrl": {
"type": "string",
"default": "",
"description": "The URL to use for fetching available Dotnet versions."
},
"nugetConfigPath": {
"type": "string",
"default": "",
"description": "Path to a NuGet.Config file to copy into the container. This can be used to configure private package sources for the dotnet CLI."
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csharp"
]
}
},
"containerEnv": {
"DOTNET_ROOT": "/usr/share/dotnet",
"PATH": "$PATH:$DOTNET_ROOT:~/.dotnet/tools",
"DOTNET_RUNNING_IN_CONTAINER": "true",
"DOTNET_USE_POLLING_FILE_WATCHER": "true",
"DOTNET_CLI_TELEMETRY_OPTOUT": "1"
}
}
11 changes: 11 additions & 0 deletions features/src/dotnet/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
. ./functions.sh

"./installer_$(detect_arch)" \
-version="${VERSION:-"latest"}" \
-additionalVersions="${ADDITIONALVERSIONS:-""}" \
-dotnetRuntimeVersions="${DOTNETRUNTIMEVERSIONS:-""}" \
-aspNetCoreRuntimeVersions="${ASPNETCORERUNTIMEVERSIONS:-""}" \
-workloads="${WORKLOADS:-""}" \
-downloadUrl="${DOWNLOADURL:-""}" \
-versionsUrl="${VERSIONSURL:-""}" \
-nugetConfigPath="${NUGETCONFIGPATH:-""}"
Loading
Loading