Skip to content

MSBuild condition for runtime identifier "family" #2037

@AnthonyMastrean

Description

@AnthonyMastrean

So, I'm experimenting with some of the new compile/deploy options. Maybe I want to do something different depending on the runtime identifier that I'm passed. But, I might not really know if I'm going to get win, win-x64, or win7-x64, for example.

<PropertyGroup Condition="'$(RuntimeIdentifier)'=='win-x64'">

Is there anyway to detect the "family" of runtime identifier or to have access to the entire graph in MSBuild?

Are you going to tell me to use a string property function? Would that be reliable? Is this a bad idea?

<PropertyGroup Condition="$(RuntimeIdentifier.StartsWith('win')">

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions