Skip to content

Metadata should support instance methods #1155

@cdmihai

Description

@cdmihai

Property functions allow string instance methods, like $(prop.Replace('foo', 'bar')). It would be nice if metadata could also support this: %(Filename.Replace('foo', 'bar')).

Because this is not currently supported, users have to do an ugly workaround: http://stackoverflow.com/questions/5103026/in-msbuild-can-i-use-the-string-replace-function-on-a-metadata-item/8904902#8904902

To the the string instance functions we could, maybe, also add Combine and ChangeExtension from Path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions