Skip to content

Weirdness with item transforms and properties with quotes #12624

@rolfbjarne

Description

@rolfbjarne

I'm not sure if this is a bug, or if it's been reported already, but this:

<Project>
  <PropertyGroup>
    <StuffWithQuotes>What's Up</StuffWithQuotes>
    <StuffWithoutQuotes>Down Under</StuffWithoutQuotes>
  </PropertyGroup>
  <ItemGroup>
    <ItemGroupWithQuotes Include="@(EmptyItemGroup->'$(StuffWithQuotes)')" />
    <ItemGroupWithoutQuotes Include="@(EmptyItemGroup->'$(StuffWithoutQuotes)')" />
  </ItemGroup>
  <Target Name="Build">
    <Warning Text="ItemGroupWithQuotes=@(ItemGroupWithQuotes)" />
    <Warning Text="ItemGroupWithoutQuotes=@(ItemGroupWithoutQuotes)" />
  </Target>
</Project>

Prints:

warning ItemGroupWithQuotes=@(EmptyItemGroup->What's Up)
warning ItemGroupWithoutQuotes=

I'd expect the "ItemGroupWithQuotes" line to behave like the "ItemGroupWithoutQuotes" line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: LanguageIssues impacting the MSBuild programming language.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions