Skip to content

Exception when evaluating new('%(Identity)').Substring(23) #260

@KirillOsenkov

Description

@KirillOsenkov

When MSBuild evaluates the Substring call on this line:

<Compile Update="@(Compile->WithMetadataValue('DefiningProjectName', '$(MSBuildProjectName)'))" Link="external/roslyn/$([System.String]::new('%(Identity)').Substring(23))" />

There's a first-chance exception because the literal string is %(Identity) (not expanded), so calling Substring(23) on it throws

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions