Skip to content

Rationalize behavior of TestItemsWithUnexpandableMetadata #6518

@KirillOsenkov

Description

@KirillOsenkov

Reenable the test TestItemsWithUnexpandableMetadata

public void TestItemsWithUnexpandableMetadata()

Build this project:

<Project DefaultTargets="Build">

  <ItemDefinitionGroup>
    <F>
      <MetadataFileName>a\b\%(Filename).c</MetadataFileName>
    </F>
  </ItemDefinitionGroup>

  <ItemGroup>
    <F Include="-in &quot;x\y\z&quot;" />
  </ItemGroup>

 <Target Name="Build" />

</Project>

The diag console logger currently prints:

Initial Items:
F
    -in "x\y\z"
        MetadataFileName = Cannot expand metadata in expression "a\b\%(Filename).c". The item metadata "%(Filename)" ca
nnot be applied to the path "-in "x\y\z"". Illegal characters in path.

The logger in unit-test TestItemsWithUnexpandableMetadata currently prints:

Initial Items:
F
    -in "x\y\z"
        MetadataFileName = a\b\%(Filename).c

And I don't know why, nor do I know which behavior is better.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions