Skip to content

Feature Request: feature-test function #7754

Open
@Zastai

Description

@Zastai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: LanguageIssues impacting the MSBuild programming language.needs-designRequires discussion with the dev team before attempting a fix.triaged

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions