Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property functions with a single _ as an argument return bad results #10435

Closed
rainersigwald opened this issue Jul 23, 2024 · 0 comments · Fixed by #10436 or #10438
Closed

Property functions with a single _ as an argument return bad results #10435

rainersigwald opened this issue Jul 23, 2024 · 0 comments · Fixed by #10436 or #10438

Comments

@rainersigwald
Copy link
Member

rainersigwald commented Jul 23, 2024

<Project>
    <Target Name="Go">
      <Warning Text="Surprise! $([System.String]::Join('_', 'asdf', 'jkl'))" />
    </Target>
</Project>

New:

artifacts\bin\bootstrap\net472\MSBuild\Current\Bin\MSBuild.exe .\foo.proj -tl:false
MSBuild version 17.12.0-dev-24373-01+9f69926a2 for .NET Framework

S:\msbuild\foo.proj(18,7): warning : Surprise!

Expected:

msbuild .\foo.proj -tl:false
MSBuild version 17.12.0-preview-24367-07+486dbb4a9 for .NET Framework


S:\msbuild\foo.proj(18,7): warning : Surprise! asdf_jkl

This is the root cause of errors in dotnet/sdk#42258 because of https://github.com/dotnet/wpf/blob/d21766ccfcdeb05aa3feeb6a195c01dbf2e1a5fb/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFX.targets#L376 and was introduced by 9f69926, specifically

if (args.Any(a => "_".Equals(a)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant