Skip to content

Should MSBuild report a warning if DOTNET_HOST_PATH is set to a directory? #12911

@jjonescz

Description

@jjonescz

See https://developercommunity.visualstudio.com/t/VS-2026-fails-to-build-net-10-web-app/11011933 (https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2654293).

Roslyn build tasks use DOTNET_HOST_PATH variable set by MSBuild, I assume other tasks might do that too. If that variable is overwritten by the user from the outside to a directory path (instead of a file path), this leads to unhelpful errors, so it might be nice if MSBuild warned about that to help users determine the root cause.

Metadata

Metadata

Labels

Area: LoggingArea: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.triaged
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions