WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@jjonescz
Copy link
Member

@jjonescz jjonescz commented Dec 5, 2025

Backport of:

Description

Fixes dotnet/msbuild#12669. Before the change to use csc apphost, we were searching for dotnet.exe either from DOTNET_HOST_PATH or PATH. With csc apphost (#80026) we regressed this by considering the dotnet host only from DOTNET_HOST_PATH (and passing that as DOTNET_ROOT to the apphost) - but that variable is not provided by MSBuild older than 18.x (where the previous non-apphost implementation would work fine since it would fallback to finding dotnet.exe in PATH).

Customer impact

We've seen several dotnet repos hit this when updating to .NET 10 SDK. It can be worked around by explicitly setting DOTNET_HOST_PATH env var before build, but that's not very straightforward nor ergonomic.

Regression

Yes, this has worked before .NET 10 RC2.

Testing

Unit tests.

Risk

Low. Only brings back previous behavior.

@jjonescz jjonescz marked this pull request as ready for review December 5, 2025 11:34
@jjonescz jjonescz requested a review from a team as a code owner December 5, 2025 11:34
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.

1 participant