ikvmnet / ikvm

A Java Virtual Machine and Bytecode-to-IL Converter for .NET
Other
1.28k stars 121 forks source link

`System.Range` defined twice when using version 8.10.0 #579

Closed jeremyosterhoudt closed 3 months ago

jeremyosterhoudt commented 3 months ago

Hello. I was trying out version 8.10.0 using the latest Nuget package and ran into an issue where the compiler thinks System.Range is defined in both the System.Runtime assembly and in the IKVM.Runtime assembly.

Program.cs(3,20): Error CS0433 : The type 'Range' exists in both 'IKVM.Runtime, Version=8.10.0.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58' and 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I was able to replicate this with a simple command line program

public static class RangeConflict
{
    public static void Main(string[] args)
    {
        var r = new System.Range();
    }
}

I also tried to define the System.Range as it's own import (using SystemRange = System.Range;) but unfortunately it does not solve the conflict.

The issue is not present with 8.9.1.