-
Notifications
You must be signed in to change notification settings - Fork 6k
Tweak the wording on DOTNET_HOST_PATH docs to align with the new world #49422
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
base: main
Are you sure you want to change the base?
Conversation
In .NET 10 / VS2026 we have a new invariant for DOTNET_HOST_PATH in builds that we should document
There was a problem hiding this 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 updates the documentation for the DOTNET_HOST_PATH environment variable to reflect new behavior in .NET 10 / Visual Studio 2026. The key change is that MSBuild in Visual Studio 2026 will now guarantee that DOTNET_HOST_PATH is set for all builds of .NET SDK projects, representing a shift in how this environment variable should be used.
Key Changes:
- Expanded the description to clarify that
DOTNET_HOST_PATHapplies both to running processes and to MSBuild build scenarios - Removed the conditional algorithm for locating
dotnet(previously advising fallback to PATH) - Added guidance that MSBuild tools should expect
DOTNET_HOST_PATHto be set and may emit diagnostics when missing
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
| - if `DOTNET_HOST_PATH` is set, use that value directly | ||
| - otherwise, rely on `dotnet` via the system's `PATH` | ||
|
|
||
| > [!NOTE] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep this. You cannot rely on DOTNET_HOST_PATH being set unless you were launched from the SDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not remove the caveat that DOTNET_HOST_PATH only applies to SDK and MSBuild components
In .NET 10 / VS2026 we have a new invariant for DOTNET_HOST_PATH in builds that we should document.
Internal previews