Skip to content

Missing quotes in target Outputs -> expression results in batching, broken incrementality #6422

Open
@KirillOsenkov

Description

@KirillOsenkov
<Project DefaultTargets="Build">
  <PropertyGroup>
    <Destination>dest</Destination>
  </PropertyGroup>

  <ItemGroup>
    <File Include="1.proj" />
    <File Include="2.proj" />
  </ItemGroup>

  <Target Name="Delete">
    <!--<RemoveDir Directories="$(Destination)\Contents" />-->
  </Target>

  <Target Name="Build" DependsOnTargets="Delete" Inputs="@(File)" Outputs="@(File->$(Destination)\Contents\%(Filename)%(Extension))">
    <Copy SourceFiles="@(File)" DestinationFolder="$(Destination)\Contents\" SkipUnchangedFiles="true" />
  </Target>
</Project>

This behaves not in the expected way. Wondering if we should show a warning? (Probably an error would be a breaking change??)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: LanguageIssues impacting the MSBuild programming language.needs-designRequires discussion with the dev team before attempting a fix.triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions