msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Feature Request: feature-test function

Open Zastai opened this issue 2 years ago • 0 comments

See also #2916

MSBuild.exe has supported TaskHostFactory since VS2012, but support only landed in the .NET SDK in version 17.1 (6.0.200).

It is possible to write a condition to test for both cases, including making use of a version comparison (assuming that's supported in older VS/SDKs).

However, it would be far more convenient (and far less brittle) to have a property function available to test for this and other features, e.g. Condition=" $([MSBuild]::HasFeature('task-host-factory')) ". This would then require documenting the feature names for any other new features added in each release.

Zastai avatar Jun 28 '22 20:06 Zastai