Install runtimes to DOTNET_GLOBAL_INSTALL_DIR when set#16764
Merged
AndriySvyryd merged 3 commits intomainfrom Apr 29, 2026
Merged
Install runtimes to DOTNET_GLOBAL_INSTALL_DIR when set#16764AndriySvyryd merged 3 commits intomainfrom
AndriySvyryd merged 3 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/7ccc9cec-d18e-45be-96e3-4227afc36a1e Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
…me install path Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/834bab13-74c2-4704-be4e-c66f62f68e0f Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
AndriySvyryd
April 28, 2026 19:54
View session
There was a problem hiding this comment.
Pull request overview
This PR aims to ensure runtimes specified under global.json → tools.runtimes are installed into DOTNET_GLOBAL_INSTALL_DIR (when set), instead of always installing into the repo-local .dotnet folder.
Changes:
- Adds an MSBuild
_DotNetPathproperty that prefers$(DOTNET_GLOBAL_INSTALL_DIR)and falls back to$(RepoRoot).dotnet. - Wires
_DotNetPathinto theInstallDotNetCoretask via itsDotNetPathparameter.
Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/117b7ac1-f8f4-41b0-b21a-f62e8c7d5b19 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
mmitche
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up to #16686
InstallDotNetCore.targetshardcoded the runtime install path to$(RepoRoot).dotnet, so runtimes declared inglobal.json'stools.runtimeswere always installed locally even whenDOTNET_GLOBAL_INSTALL_DIRdirected the SDK elsewhere. Additionally, theeng/common/dotnet-install.{sh,ps1}wrapper scripts hardcoded the install root to${RepoRoot}/.dotnet, so even after wiring_DotNetPathinto the task's pre-check, runtimes would still be physically installed locally — causing the pre-check to miss them and trigger repeated installs on subsequent builds.DOTNET_GLOBAL_INSTALL_DIRinto theInstallDotNetCoretask'sDotNetPath, falling back to$(RepoRoot).dotnetwhen unset.eng/common/dotnet-install.shandeng/common/dotnet-install.ps1to install runtimes intoDOTNET_GLOBAL_INSTALL_DIRwhen set, falling back to${RepoRoot}/.dotnet. This matches the existing SDK install path logic intools.sh/tools.ps1and ensures the install root matches_DotNetPathso the pre-check correctly identifies already-installed runtimes.To double check: