Skip to content

Consider simpler GetPathOfFileAbove syntax #8134

Open
@AArnott

Description

@AArnott

Could GetPathOfFileAbove and GetDirectoryNameOfFileAbove be made to accept relative paths for their startingDirectory parameter? That way, we can drop the macro that so often is required in the argument.

It would allow this simplification:

-  <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" Condition=" '$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))' != '' " />
+  <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, ..))" Condition=" '$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, ..))' != '' " />

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions