Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing/inconsistent .NET versions preinstalled, depending on os/version #9834

Closed
13 tasks done
bkoelman opened this issue May 12, 2024 · 3 comments
Closed
13 tasks done
Assignees
Labels
Area: .NET Core awaiting-deployment Code complete; awaiting deployment and/or deployment in progress bug report OS: macOS OS: Windows

Comments

@bkoelman
Copy link

bkoelman commented May 12, 2024

Description

Looking at the master branch, these are the .NET versions currently preinstalled:

Image Readme.md toolset.json
Ubuntu2404 8.0.104 8.0
Ubuntu2204, Ubuntu2004 6.0.421, 7.0.408, 8.0.204 6.0, 7.0, 8.0
Windows2019 6.0.129, 6.0.203, 6.0.321, 6.0.421, 7.0.118, 7.0.203, 7.0.315, 7.0.408 6.0, 7.0
Windows2022 6.0.129, 6.0.203, 6.0.321, 6.0.421, 7.0.118, 7.0.203, 7.0.315, 7.0.408, 8.0.204 6.0, 7.0
macOS 14, 13 7.0.102, 7.0.202, 7.0.306, 7.0.408, 8.0.101, 8.0.204 7.0, 8.0
macOS 12 6.0.421, 7.0.102, 7.0.202, 7.0.306, 7.0.408, 8.0.101, 8.0.204 6.0, 7.0, 8.0
macOS 11 6.0.418, 7.0.102, 7.0.202, 7.0.306, 7.0.405, 8.0.101 6.0, 7.0, 8.0

This makes it impossible to "just" run a multi-targeted app against all .NET runtimes that aren't out of support on all OSes. To enable that, we need to manually install the desired versions upfront, but then what's the point of preinstalling them? Why not just install the same set everywhere? I'd expect the latest versions of .NET 6 and 8 preinstalled, possibly also .NET 7 because it's still pretty young.

Note the documented versions on Windows2022 don't match with toolset.json. And I wonder why multiple patch versions are listed in Readme.md. Are those SDKs or runtimes, and are they really all installed?

Running dotnet build via DotNetCoreCLI@2 task from Azure DevOps logs the following line:

Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.

This looks pretty inconsistent as well, not mentioning any of the more recent versions that aren't installed.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

RicoSuter/NSwag#4891

Is it regression?

no

Expected behavior

Recent patch version of .NET SDK/runtime preinstalled for all .NET versions that aren't out of support, on all OSes.

Actual behavior

A confusing mix of preinstalled versions per image os/version, so we need to manually install dependent versions for a consistent experience.

@erik-bershel
Copy link
Contributor

Hey @bkoelman!

Good catch. Somehow we missed .NET SDK 8.0 on Windows 2019. I opened PR with fix for it: #9838

As for other mentioned questions:

  • Ubuntu 24.04 is in development. List of tools might be changed any moment before Beta and GA.
  • There is no straight connection between toolset.json and list of installed tools. We never claim toolset.json as a source of truth. It is used during the build process, but process has its own nuances.
  • All declared components are actually installed. You can contact the developer about problems with the operation of a particular Azure task.
  • For macOS and Windows images, a high user demand for additional SDKs was previously noted, as well as the ability to satisfy this need. As a result, we have several additional pre-installed SDKs on the listed systems.
  • According docs our SLA is next for .NET: 2 latest LTS versions and 1 latest version. For each feature version only latest patch is installed.
  • Until recently, version .NET 6.0 was not available for installation on macOS 13/14 - I will check if the situation has changed, perhaps it will be added too.

@erik-bershel erik-bershel added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label May 14, 2024
@bkoelman
Copy link
Author

Thanks for the clarifications. I've run dotnet --info on these images, see the outcomes below:

Image SDK versions Runtime versions
ubuntu-24.04 8.0.4 8.0.4
ubuntu-22.04, ubuntu-20.04 6.0.421, 7.0.408, 8.0.204 6.0.29, 7.0.18, 8.0.4
windows-2022 6.0.129, 6.0.203, 6.0.321, 6.0.421, 7.0.118, 7.0.203, 7.0.315, 7.0.408, 8.0.204 6.0.5, 6.0.26, 6.0.29, 7.0.5, 7.0.18, 8.0.4
windows-2019 6.0.129, 6.0.203, 6.0.321, 6.0.421, 7.0.118, 7.0.203, 7.0.315, 7.0.408 6.0.5, 6.0.26, 6.0.29, 7.0.5, 7.0.18
macos-14, macos-13 7.0.102, 7.0.202, 7.0.306, 7.0.408, 8.0.101, 8.0.204 7.0.2, 7.0.4, 7.0.9, 7.0.18, 8.0.1, 8.0.4
macos-12 6.0.421, 7.0.102, 7.0.202, 7.0.306, 7.0.408, 8.0.101, 8.0.204 6.0.29, 7.0.2, 7.0.4, 7.0.9, 7.0.18, 8.0.1, 8.0.4
macos-11 (deprecated) 6.0.418, 7.0.102, 7.0.202, 7.0.306, 7.0.405, 8.0.101 6.0.26, 7.0.2, 7.0.4, 7.0.9, 7.0.15, 8.0.1, 8.0.4

To summarize:

  • The versions documented in Readme.md match what's installed.
  • .NET 8 is missing on windows-2019 (PR opened).
  • .NET 6 is missing on macos-14 and macos-13 (pending).

One other thing that surprised me: At Available Images, macos-latest aliases macos-14, but in Azure DevOps, it aliases macos-12 (I've verified it actually does).

@erik-bershel
Copy link
Contributor

Hey @bkoelman!

I'm happy to bring some info into light.

  • fixed a bug on Windows 2019 (as we both mentioned earlier);
  • checked installation scripts for macOS-12 and macOS-11 based images: the decision was driven by the goals of saving disk space and due to the low need for versions other than the latest .NET 6.0;
  • due to the above reasons and also due to the imminent end of support for .NET 6.0, it was decided to avoid installing this component on macOS-13 and macOS-14 based images, but if we notice a high need for these components, we can change this decision, so far statistics indicate the opposite - the need is only falling;
  • for all Ubuntu based images we are tied hand and foot by the maximum image sizes, for this reason we are forced to install only one latest minor version of the .NET SDK for each major version: unfortunately, there is no reasonable way to bypass this limitation - the community will suffer more if we replace the disk with a larger one, which will result in an increase in cost;
  • ubuntu-24.04 is in beta, so any SLA is not applicable, but MS released 6.0 and 7.0 packages for Numbat couple days ago, so it should be fixed too soon.

Since it I'm going to close it now as partially fixed and partially won't fix. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: .NET Core awaiting-deployment Code complete; awaiting deployment and/or deployment in progress bug report OS: macOS OS: Windows
Projects
None yet
Development

No branches or pull requests

3 participants