dotnet / dotnet/msbuild

Metadata should support instance methods

Open
#1,155 6 comments 28 reactions 0 assignees View on GitHub
Area: Language backlog triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

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`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.