actions/runner-images

[macOS, Windows] .NET SDK pre-installation policy will be changed on September, 6

AlenaSviridenko opened this issue · 2 comments

Breaking changes

The .NET versions maintenance strategy will be changed on Window and macOS images. Currently, we install all available and supported versions of .NET SDK (2.1.x, 3.1.x, 5.0.x). This approach will be changed in favor of installing the latest patch version for every feature version.

What does it mean?

The SDK version is composed of the following parts: x.y.znn. z is the feature version and nn is the patch version. For example, for version 2.1.302, feature version is 3 and 02 is the patch version.

According to the new approach we will only install the latest patch version for every feature version, i.e. only 2.1.302 will be installed for 2.1.3x, only 2.1.403 for 2.1.4x and etc.
All versions of the .NET SDK that are not the latest patch versions will be removed from Windows and macOS images on September, 6

Target date

Image deployment will start September, 6 and will take 3-4 days.

The motivation for the changes

We are reconsidering the .NET SDK preinstallation policy on images to provide more free space for customers usage and new tools requests, and also speed up image generation and hence the deployment process. We already applied this policy to the Ubuntu images, and it works pretty good there.

For more information related to software and images support policy please see the Software and image guidelines doc.

Possible impact

If you use the actions/setup-dotnet action or the UseDotNet task, you will not be affected. Also, if you don't use the global.json file to specify .NET SDK version, there will be no changes for you.

If you use the global.json file, your build will be affected in the following cases:

  1. Your build will fail, if the global.json file contains the rollForward: disable property and SDK version that is not the latest patch version, for example:
{
  "sdk": {
    "version": "3.1.100",
    "rollForward": "disable"
  }
}
  1. .NET SDK version will be automatically changed to the latest patch if the global.json file contains the rollForward: patch property and SDK version that is not the latest patch version, for example:
{
  "sdk": {
    "version": "3.1.100",
    "rollForward": "patch"
  }
}

If the rollForward field is not specified in your global.json file, there will be no changes for you. The latest installed patch level is used.

Please visit the global.json overview doc to learn more about the global.json schema and matching rules.

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019

Mitigation ways

For using the exact .NET SDK version, please consider using actions to install it on-flight:

  1. GitHub Actions: actions/setup-dotnet action
steps:
- uses: actions/checkout@main
- uses: actions/setup-dotnet@v1
  with:
    dotnet-version: '<dotnet version>'
- run: dotnet build <my project>
  1. Azure DevOps: UseDotNet task
steps:
- task: UseDotNet@2
  displayName: 'Use .NET Core sdk'
  inputs:
    version: <dotnet version>

That should also resolve .NET install time discussion: #2367

All the images have been deployed.