Added LTS runtime installation before requested dotnet installation:
When dotnet is installed after usage of some other version, install script fails to override dotnet.exe as it appears to be used by a process. Workaround is to pass --skip-unversioned-files flag to the install script and avoid overriding this file altogether. However, to ensure better compatibility and to avoid vulnerability issues, LTS runtime is now installed first, providing up-to-date unversioned files (such as CLI) for further usage.
Added E2E tests that check for the problem described in the issue
Additional E2E tests were added to address this issue in the future.
Description
--skip-unversioned-files
flag to the install script and avoid overriding this file altogether. However, to ensure better compatibility and to avoid vulnerability issues, LTS runtime is now installed first, providing up-to-date unversioned files (such as CLI) for further usage.Related issue: https://github.com/actions/setup-dotnet/issues/387
Check list: