Skip to content

Conversation

@erik-bershel
Copy link
Contributor

@erik-bershel erik-bershel commented Dec 3, 2025

Description

  • .NET is installed in the default location, meaning the latest installed version is automatically available. Anyone wishing to use a different version in a different instance must set the variable manually or use a suitable automation tool (setup-dotnet for GitHub Actions, UseDotNet@2 for Azure DevOps).
  • Setting DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 and DOTNET_NOLOGO=1

Related issue:

#13365

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

Copilot AI review requested due to automatic review settings December 3, 2025 12:17
Copilot finished reviewing on behalf of erik-bershel December 3, 2025 12:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the DOTNET_ROOT environment variable from macOS runner images and adds two new .NET configuration environment variables to improve consistency with Ubuntu images. Since .NET is installed in the default location (~/.dotnet), setting DOTNET_ROOT is unnecessary and can interfere with users who want to use different .NET versions via GitHub Actions' setup-dotnet or Azure DevOps' UseDotNet@2 tasks.

  • Removes DOTNET_ROOT=$HOME/.dotnet environment variable
  • Adds DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 and DOTNET_NOLOGO=1 environment variables to match Ubuntu image configuration
  • Maintains DOTNET_MULTILEVEL_LOOKUP=0 to prevent searching for .NET installations in multiple locations

@nagilson
Copy link

nagilson commented Dec 3, 2025

I think this is a great change and moves towards the correct behavior.

With that said, I believe this is a breaking change. Does the runner-images team have an A-B, or safer rollout mechanism which requires an image upgrade?

Basically, before the bashrc file force overrode DOTNET_ROOT to the $HOME/.dotnet. That is indeed the default location and what is normally used, so the default experience will not be changed. Users do have to explicitly do or import something that overrides DOTNET_ROOT to a custom value, but engineers may have expected the prior behavior, so this may cause their processes to suddenly use an unexpected version of the dotnet.exe (DOTNET_ROOT).

This will certainly cause live failures in CI as many folks set DOTNET_ROOT. Again, this is the correct behavior, but we should shift to this gently.

@erik-bershel
Copy link
Contributor Author

I think this is a great change and moves towards the correct behavior.

With that said, I believe this is a breaking change. Does the runner-images team have an A-B, or safer rollout mechanism which requires an image upgrade?

Basically, before the bashrc file force overrode DOTNET_ROOT to the $HOME/.dotnet. That is indeed the default location and what is normally used, so the default experience will not be changed. Users do have to explicitly do or import something that overrides DOTNET_ROOT to a custom value, but engineers may have expected the prior behavior, so this may cause their processes to suddenly use an unexpected version of the dotnet.exe (DOTNET_ROOT).

This will certainly cause live failures in CI as many folks set DOTNET_ROOT. Again, this is the correct behavior, but we should shift to this gently.

I think this change will be around for a while. It'll likely hit our images in the second half of January or somewhere around, after the announcement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants