Skip to content

ILLink Task failed unexpectedly inside VS #42676

Closed

Description

@ViktorHofer
Error	MSB4018	The "ILLink" task failed unexpectedly.
System.InvalidOperationException: DOTNET_HOST_PATH is not set
   at ILLink.Tasks.ILLink.get_DotNetPath()
   at ILLink.Tasks.ILLink.GenerateFullPathToTool()
   at Microsoft.Build.Utilities.ToolTask.ComputePathToTool()
   at Microsoft.Build.Utilities.ToolTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	System.Private.Xml	C:\git\runtime3\eng\illink.targets	288	

Repro steps: #20411 (comment).

cc @layomia @ericstj

Activity

  1. added
    untriaged
    on Sep 24, 2020
  2. removed
    untriaged
    on Sep 24, 2020
  3. added this to the 6.0.0 milestone on Sep 24, 2020
  4. added a commit that references this issue on Sep 24, 2020
  5. self-assigned this
    on Sep 24, 2020
  6. eerhardt commented on Sep 24, 2020

    @eerhardt
    Member
  7. ViktorHofer commented on Sep 24, 2020

    @ViktorHofer
    MemberAuthor

    This is about Desktop MSBuild inside VS. I don't think the SDK comes into play here?

  8. sbomer commented on Sep 24, 2020

    @sbomer
    Member

    VS still uses the SDK targets (just on desktop MSBuild) when publishing. We still need the fix in runtime - I'm just talking about the "dotnet publish /p:PublishTrimmed" scenario. Desktop MSBuild or not, these targets locate a dotnet host, and start a new process that runs the linker on .NET Core.

  9. ViktorHofer commented on Sep 24, 2020

    @ViktorHofer
    MemberAuthor

    Oh, just to clarify, this is broken in our custom invocation of the ILLinkTask in illink.targets: eng\illink.targets 288.

  10. sbomer commented on Sep 24, 2020

    @sbomer
    Member

    Right, I'm just trying to pre-empt concerns that it's similarly broken in the SDK. :)

  11. ViktorHofer commented on Sep 24, 2020

    @ViktorHofer
    MemberAuthor

    Ah cool, got it.

  12. ghost locked as resolved and limited conversation to collaborators on Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions