mhutch / MonoDevelop.MSBuildEditor

Improved MSBuild editing support
Other
228 stars 26 forks source link

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

Open KirillOsenkov opened 22 hours ago

KirillOsenkov commented 22 hours ago

When MSBuild evaluates the Substring call on this line: https://github.com/mhutch/MonoDevelop.MSBuildEditor/blob/c77880a6ecd589ee076cfbb1084469edbf1b58ed/MonoDevelop.MSBuild.Editor.Common/MonoDevelop.MSBuild.Editor.Common.csproj#L64

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