When attempting to use inline arrays in .NET 10, I encounter a TypeLoadException. The following code reproduces the issue:
var array = default(System.Runtime.CompilerServices.InlineArray2<int>);
Span<int> span = array;
span[0] = 1;
span[1] = 2;
foreach (var i in span)
{
Console.WriteLine(i);
}
Unhandled exception. System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.InlineArray2`1' from assembly 'System.Runtime, Version=10.0.0.0...