https://github.com/devlooped/actions-dotnet-env
Setup .NET environment
https://github.com/devlooped/actions-dotnet-env
Last synced: 4 months ago
JSON representation
Setup .NET environment
- Host: GitHub
- URL: https://github.com/devlooped/actions-dotnet-env
- Owner: devlooped
- License: mit
- Created: 2025-05-26T23:48:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-08T00:30:08.000Z (5 months ago)
- Last Synced: 2026-02-08T09:15:18.874Z (5 months ago)
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
# >_ dotnet-env
Automatically setup .NET environment for actively used SDK versions
## Usage
The action is typically used in combination with [which-dotnet](https://github.com/marketplace/actions/which-dotnet)
to keep the CI environment up-to-date with evolving .NET versions used in your repository projects.
If no previously persisted JSON file is provided, automatic discovery of used .NET SDK versions
will be performed using [which-dotnet](https://github.com/marketplace/actions/which-dotnet).
> It's recommended you set up a separate workflow that keeps a `dotnet.json` file up-to-date
> to speed-up your builds by avoiding dynamic discovery on every build.
Assuming your repository has the `dotnet.json` file in its default location (under `./.github`),
or has no versions file at all:
```yml
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
- name: ⚙ dotnet
uses: devlooped/actions-dotnet-env@v1
- name: 🙏 build
run: dotnet build
```
If you use a different location for the versions file:
```yml
- name: ⚙ dotnet
uses: devlooped/actions-dotnet-env@v1
with:
versions: ./dotnet-versions.json
```
In order to bootstrap the initial `dotnet.json` file, you can run the [dotnet-env](https://www.nuget.org/packages/dotnet-env)
tool with the `-o` parameter, which initializes it at the default location `./.github/dotnet.json`.
# Sponsors
[](https://github.com/clarius)
[](https://github.com/MFB-Technologies-Inc)
[](https://github.com/torutek-gh)
[](https://github.com/drivenet)
[](https://github.com/Keflon)
[](https://github.com/tbolon)
[](https://github.com/kfrancis)
[](https://github.com/twenzel)
[](https://github.com/unoplatform)
[](https://github.com/rbnswartz)
[](https://github.com/jfoshee)
[](https://github.com/Mrxx99)
[](https://github.com/eajhnsn1)
[](https://github.com/davidjenni)
[](https://github.com/Jonathan-Hickey)
[](https://github.com/akunzai)
[](https://github.com/KenBonny)
[](https://github.com/SimonCropp)
[](https://github.com/agileworks-eu)
[](https://github.com/arsdragonfly)
[](https://github.com/vezel-dev)
[](https://github.com/ChilliCream)
[](https://github.com/4OTC)
[](https://github.com/v-limo)
[](https://github.com/jordansjones)
[](https://github.com/DominicSchell)
[](https://github.com/jwendl)
[](https://github.com/adalon)
[](https://github.com/Eule02)
[](https://github.com/sailro)
[](https://github.com/torutek)
[](https://github.com/sponsors/devlooped)
[Learn more about GitHub Sponsors](https://github.com/sponsors)