devcontainers / devcontainers/features
How to change .NET version?
- Dominant language
- Shell
- Stars
- 1.5k
- Forks
- 621
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 4
Description
How do I use the additional .NET version installed by the dotnet feature? For example, if the feature is configured such as:
```
"ghcr.io/devcontainers/features/dotnet:1": {
"version": "7.0.306",
"installUsingApt": "false",
"additionalVersions": "6"
}
```
How do I use .NET 6? When I run `dotnet --list-sdks`, only `7.0.306 [/usr/local/dotnet/7.0.306/sdk]` is shown.
I can see `6.0.415` is present.
```bash
>ls -la /usr/local/dotnet/
total 24
drwxrwsr-x 1 codespace dotnet 4096 Oct 17 22:34 .
drwxr-xr-x 1 root root 4096 Oct 17 22:44 ..
drwxrwsr-x 8 codespace dotnet 4096 Oct 17 22:34 6.0.415
drwxrwsr-x 1 codespace dotnet 4096 Oct 23 18:51 7.0.306
lrwxrwxrwx 1 codespace dotnet 25 Oct 17 22:34 current -> /usr/local/dotnet/7.0.306
```
My `PATH` environment variable seems to include only `/usr/local/dotnet/current`.
Contributor guide
Assessment
This issue has not been assessed yet.