Skip to content

.NET 5 RC1 breaks string CompareTo #42234

@333fred

Description

@333fred

Description

Run this code:

using System;

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            // The quotes are required for this repro
            var string1 = "'delegate'";
            var string2 = "'delegate sub'";
            Console.WriteLine(string1.CompareTo(string2));
        }
    }
}

On .NET 5 P7 and .NET 472, it prints -1. On .NET 5 RC1, it prints 1. This is preventing Roslyn from updating to a new version.

Configuration

.NET 5 RC1

Regression?

From .NET 5 P7

I'm not entirely sure if this was a regression in P8 or RC1: the Roslyn move to P8 has been delayed by other issues we've been working through.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions