Commit 6de2cf2
Restore InitializeToolset call in MSBuild function
When the Arcade msbuild logger was removed in #16814, the
InitializeToolset call in the MSBuild function (tools.{sh,ps1}) was
removed alongside it. That call had a load-bearing side effect:
InitializeToolset invokes GetNuGetPackageCachePath, which exports
NUGET_PACKAGES.
Without NUGET_PACKAGES exported, NuGet restore defaults to the user
profile while RepoLayout.props sets MSBuild's $(NuGetPackageRoot) to
$(RepoRoot)/.packages/ under ContinuousIntegrationBuild=true. Generated
.nuget.g.props imports guarded by Exists($(NuGetPackageRoot)...) are
silently skipped, and properties contributed by them (e.g.
XunitConsoleNetCoreAppPath) end up undefined.
Restore the InitializeToolset call in the MSBuild function gated on
$ci, matching the pre-#16814 behavior. Placing it in the MSBuild
function rather than at tools.{sh,ps1} load time ensures any
configure-toolset overrides have already been imported.
Fixes #16898
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 1cc4e30 commit 6de2cf2
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| 751 | + | |
| 752 | + | |
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
508 | 510 | | |
509 | 511 | | |
510 | 512 | | |
| |||
0 commit comments