-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
NativeAOT publish fails on fi_FI.utf8 locale #98550
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescribe the bugTrying to publish freshly created console application with
Note that the first -1 actually has "U+2212 : MINUS SIGN" printed in the console. As a workaround locale can be set to en_US.utf8 and the publish works as expected. To ReproduceOn Linux machine set locale to fi_FI.utf8
Publish it with
Further technical details
|
It looks like runtime/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets Lines 8 to 9 in 7185df8
|
We can't use A workaround I found is using Any preferences? |
I wonder if you're seeing this because of dotnet/msbuild#9449. If you |
@tmds I don't think so, that PR only changes the culture of the Exec task which is not used here. |
Maybe duplicating would be better. We can use <_originalTargetOS Condition="$(_originalTargetOS.Contains('.'))">$(_originalTargetOS.SubString(0, $(_originalTargetOS.IndexOf('.'))))</_originalTargetOS> |
Yeah I like Contains better too. |
This culture uses `U+2212 : MINUS SIGN` instead of `-` for negative numbers which trips up msbuild when comparing the property. Instead of using an intermediate property just inline the usage and use `Contains()` for better readability. Fixes dotnet#98550
I don't suspect that either, though it's a weird coincidence that this is reported with 8.0.200 which is the first SDK to include that change. I'm surprised the result of the evaluation depends on the system culture. I had expected msbuild to be using the invariant culture when it evaluates them. |
This culture uses `U+2212 : MINUS SIGN` instead of `-` for negative numbers which trips up msbuild when comparing the property. Instead of using an intermediate property just inline the usage and use `Contains()` for better readability. Fixes #98550
I tried that and it didn't fix the issue. I also tried with an 8.0.100 SDK and it already happens there.
Logged dotnet/msbuild#9757 to get some input from the msbuild team. |
This culture uses `U+2212 : MINUS SIGN` instead of `-` for negative numbers which trips up msbuild when comparing the property. Instead of using an intermediate property just inline the usage and use `Contains()` for better readability. Fixes dotnet#98550 (cherry picked from commit c768315)
this seems like something MSBuild should consider fixing -- by whatever trick inside the binder. Anything culture-specific by default in a build seems like a bug to me. wdyt? |
Describe the bug
Trying to publish freshly created console application with
dotnet publish /p:PublishAot=true
produces error:Note that the first -1 actually has "U+2212 : MINUS SIGN" printed in the console.
As a workaround locale can be set to en_US.utf8 and the publish works as expected.
To Reproduce
On Linux machine set locale to fi_FI.utf8
Create console application with
Publish it with
Further technical details
The text was updated successfully, but these errors were encountered: