You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
ILLinkTask should not depend on DOTNET_HOST_PATH #806
It looks like this property is only set when MSBuild is launched by dotnet build or dotnet msbuild. It won't be present when building from VS, nor desktop msbuild.exe, nor dotnet msbuild.dll. I think you should rely on a different mechanism for locating dotnet.exe. Work with folks like @vitek-karas and @nguerrera to find an appropriate convention. I believe ILLink isn't the first tool to hit this.
We could potentially use different properties and make them required instead of using those from ToolTask. If there are other tools that hit this issue, we should probably agree on a common approach.
Activity
ericstj commentedon Oct 31, 2019
/cc @sbomer
nguerrera commentedon Oct 31, 2019
It has a fallback to a property set by SDK in targets to find the root of current SDK. What problem did you encounter?
It does work with msbuild.exe today in the standard cases.
nguerrera commentedon Oct 31, 2019
https://github.com/dotnet/sdk/blob/b28a8efbfb30d84019351abb3aa9a2b15e008662/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets#L74
Is the problem using the task elsewhere than the PublishTrimmed feature?
ericstj commentedon Oct 31, 2019
We were calling task directly and not setting ToolPath / ToolExe.
nguerrera commentedon Oct 31, 2019
I don't think there is a good way for the task to magically figure out this location if not passed in from looking at $(NetCoreRoot).
ericstj commentedon Oct 31, 2019
If that's the case, shouldn't these be required parameters?
sbomer commentedon Oct 31, 2019
We could potentially use different properties and make them required instead of using those from ToolTask. If there are other tools that hit this issue, we should probably agree on a common approach.
ericstj commentedon Oct 31, 2019
I'm less concerned now that I see the shipping product doesn't have this bug and I fixed up our targets: dotnet/corefx#42266