mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-18 14:45:09 +00:00
Reworked
This commit is contained in:
parent
c89827f57a
commit
8f600af4df
@ -4,14 +4,16 @@ Date: 2021-02-15
|
|||||||
Status: Proposed
|
Status: Proposed
|
||||||
|
|
||||||
# Context
|
# Context
|
||||||
- The `v1` version of `setup-dotnet` installs dotnet to user directory. The pre-installed versions are located in system directories on Windows and Ubuntu images and after using the task all pre-installed versions become unavailable. The task always installs any dotnet version even if it is pre-installed. This behavior is different for macOS runner, where pre-installed dotnet versions are located in the same user directory and remain available. For the same reason the task on macOS runner doesn't download dotnet version again if it is pre-installed and the task uses pre-installed version.
|
- GitHub-hosted Ubuntu and Windows runners have .NET versions pre-installed in system directories, but the `v1` version of action installs .NET to user's directory for that runners. It means that action always download and install .NET version even if it is pre-installed.
|
||||||
|
The behavior is different for macOS runners because pre-installation directory matches the one that is used by action. It means action can use pre-installed versions if it exists, which speeds up customer's workflow.
|
||||||
|
|
||||||
- According dotnet documentation, if there are several installed `side-by-side` versions the dotnet CLI commands use the latest installed .NET SDK and .NET runtime for dotnet. Sometimes this behavior is unclear for users who expect the dotnet version specified in the task.
|
- According to .NET documentation (https://docs.microsoft.com/en-us/dotnet/core/versions/selection), .NET CLI will use the latest installed .NET SDK and .NET runtime if there are multiple versions installed side-by-side.
|
||||||
|
It is unclear for customers who expect that .NET specified in the task will be used for their project.
|
||||||
|
|
||||||
# Decision
|
# Decision
|
||||||
- Change default location for dotnet installation on Windows and Ubuntu images to the pre-installed versions location. It can be reached by using `-InstallDir` (or `--install-dir` for Ubuntu) property for installer scripts: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
|
- Change default location for dotnet installation on Windows and Ubuntu images to the pre-installed versions location. It can be reached by using `-InstallDir` (or `--install-dir` for Ubuntu) property for installer scripts: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
|
||||||
|
|
||||||
- Create `global.json` file via `setup-dotnet` to specify installed dotnet version as current: https://docs.microsoft.com/en-us/dotnet/core/versions/selection
|
- Create `global.json` file via `setup-dotnet` to specify installed dotnet version as current
|
||||||
|
|
||||||
# v2-preview
|
# v2-preview
|
||||||
There will be a v2-preview branch that will be created for development and testing. Any changes will first be merged into v2-preview branch. After a period of testing & verification, the v2-preview branch will be merged into the main branch and a v2 tag will be created. Any GitHub public documentation and starter workflows that mention setup-dotnet will then be updated to use v2 instead of v1.
|
There will be a v2-preview branch that will be created for development and testing. Any changes will first be merged into v2-preview branch. After a period of testing & verification, the v2-preview branch will be merged into the main branch and a v2 tag will be created. Any GitHub public documentation and starter workflows that mention setup-dotnet will then be updated to use v2 instead of v1.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user