Skip to content

Conversation

@JaynieBai
Copy link
Member

@JaynieBai JaynieBai commented Sep 24, 2024

Fixes #10583

Context

Can't evaluate

    <PropertyGroup>
      <Foo>Foo</Foo>

      <!-- This has to be numeric. -->
      <Bar>1234</Bar>

      <!-- This is a workaround. -->
      <Good>$([System.String]::Equals($(Foo), $(Bar)))</Good>

      <!-- This works on .NET 7 but on 8 it doesn't. -->
      <Bad>$(Foo.Equals($(Bar)))</Bad>
    </PropertyGroup>

Changes Made

Use the double.TryParse instead of the convert method

Testing

Add the test cases in the test method Medley()

Notes

@JaynieBai JaynieBai marked this pull request as ready for review September 24, 2024 10:31
@YuliiaKovalova YuliiaKovalova merged commit eb8e324 into dotnet:main Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: MSB4184 while evaluating an expression in property setter

3 participants