Skip to content

MSBuild should be able to detect and automatically use .NET TaskHost when a .NET Task dll is provided #12511

@baronfel

Description

@baronfel

Summary

In this stackoverflow issue a user provides a net6-targeting Task DLL to UsingTask, which doesn't work in .NET Framework MSBuild, naturally.

In a world where .NET TaskHost exists, can we detect the use of dlls that don't match the Host and auto-infer the correct TaskHost to use?

Background and Motivation

I want the simplest thing here to work - even if we log a diagnostic asking the user to explicitly specify. We should be able to crack a dll, look for identifying criteria, and then decide which TaskHost to use if it doesn't match our host.

Proposed Feature

See above

Alternative Designs

cc @ericstj - are there well-known markers in Fx/.NET Assemblies that we could use to power this detection?

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions