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

Fix DotNet root lookup #222

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

vmoroz
Copy link
Member

@vmoroz vmoroz commented Mar 11, 2024

The .Net installation on Mac creates DOTNET_ROOT environment variable that points to non-existing folder.
As a result, when we run code on Mac we may see failures because the hostfxr cannot be found.
In this PR we update the lookup for the .Net installation folder so that we not only check that the DOTNET_ROOT exists, but also that it points to an existing folder. If not, then we try to check the default .Net installation root for a platform.

@vmoroz vmoroz requested a review from jasongin March 11, 2024 02:12
@vmoroz vmoroz merged commit 5170b10 into microsoft:main Mar 11, 2024
21 checks passed
@vmoroz vmoroz deleted the pr/dotnet_root_lookup branch March 11, 2024 15:36
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.

2 participants