It looks like the previous issue #34420 was closed because it wasn't causing any problems. Well I've found a problem.
Write to repro.app.cs and dotnet run repro.app.cs:
#:property TargetFramework=net10.0
#:property ImplicitUsings=false
// transitively imports Microsoft.Extensions.DependencyModel
//#:package Silk.NET.OpenGL@2.23.0
using System;
using System.Collections.Generic;
Dictionary<string, int> dict = new() { ["a"] = 3 };
Console.WriteLine(dict.GetValueOrDefault("a", 2));
Console.WriteLine(CollectionExtensions.GetValueOrDefault(dict, "b", 2));
Then uncomment the import and try running again.
repro.app.cs(11,19): error CS0433: The type 'CollectionExtensions' exists in both 'Microsoft.Extensions.DependencyModel, Version=9.0.0.9, Culture=neutral, PublicKeyToken=adb9793829ddae60' and 'System.Collections, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
It looks like the previous issue #34420 was closed because it wasn't causing any problems. Well I've found a problem.
Write to
repro.app.csanddotnet run repro.app.cs:Then uncomment the import and try running again.