Skip to content

NativeAOT publish fails on fi_FI.utf8 locale #98550

@De-Crypted

Description

@De-Crypted

Describe the bug

Trying to publish freshly created console application with dotnet publish /p:PublishAot=true produces error:

MSBuild version 17.9.4+90725d08d for .NET
/home/user/.nuget/packages/microsoft.dotnet.ilcompiler/8.0.2/build/Microsoft.DotNet.ILCompiler.SingleEntry.targets(9,16): error MSB4086: A numeric comparison was attempted on "$(_indexOfPeriod)" that evaluates to "−1" instead of a number, in condition "'$(_indexOfPeriod)' > -1". [/home/user/sources/project/daemon/daemon.csproj]

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

dotnet new console -n app

Publish it with

dotnet publish /p:PublishAot=true

Further technical details

.NET SDK:
 Version:           8.0.200
 Commit:            438cab6a9d
 Workload version:  8.0.200-manifests.cdf2cc8e

Runtime Environment:
 OS Name:     manjaro
 OS Version:  
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /home/tk/.dotnet/sdk/8.0.200/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.2
  Architecture: x64
  Commit:       1381d5ebd2

.NET SDKs installed:
  8.0.200 [/home/tk/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.2 [/home/tk/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.2 [/home/tk/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/share/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions