Skip to content

Provide a clearer error if a .NET Task assembly uses a .NET Runtime that is unsupported by the .NET Runtime of the .NET TaskHost Node #12913

@baronfel

Description

@baronfel

Summary

When loading .NET Tasks on an out of proc .NET TaskHost Node, we locate the MSbuild from the current SDK and have that Node load and execute a Task in the assembly. If there is a runtime mismatch between that host node and the Task dll, the user will see a loading error - we should make sure that this error is very clear - the load error comes because the Task author tried to load the dll on a runtime that the Task user didn't have.

Background and Motivation

See above

Proposed Feature

When launching the taskhost node, we should be able to

  • know what the SDK version (and therefore the .NET Runtime the MSBuild binary would use) of the TaskHost is
  • probe the assembly to be loaded to find its Runtime version (based on assembly attributes and/or runtimeconfig.json parsing)
  • error if the discovered runtime version isn't supported by the runtime of the SDK

Alternative Designs

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions