Update README with note on setting DOTNET_INSTALL_DIR for Linux permission issues (#689)

* update README: setting DOTNET_INSTALL_DIR

* fix indentation
This commit is contained in:
priya-kinthali
2025-12-22 23:33:09 +05:30
committed by GitHub
parent 2016bd2012
commit 937b8dd381
4 changed files with 158 additions and 153 deletions

View File

@@ -314,6 +314,13 @@ build:
dotnet-version: '8.0.x'
cache: true
```
You can also set `DOTNET_INSTALL_DIR` to a value based on runtime variables, such as `$HOME/.dotnet` or `${{ runner.temp }}/.dotnet` before the `setup-dotnet` step:
```yml
- name: Set DOTNET_INSTALL_DIR
run: echo "DOTNET_INSTALL_DIR=$HOME/.dotnet" >> $GITHUB_ENV
```
> **Note**: On some self-hosted or large Linux runners, installing .NET under the default `/usr/share/dotnet` location may fail due to insufficient permissions. To ensure successful installation, set `DOTNET_INSTALL_DIR` to a user-writable path.
## Recommended permissions