Add typeforwards for Stack<T> and Queue<T> to mscorlib shim (#48258)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Sat, 13 Feb 2021 04:32:38 +0000 (05:32 +0100)
committerGitHub <noreply@github.com>
Sat, 13 Feb 2021 04:32:38 +0000 (20:32 -0800)
Old Xamarin implemented these types in mscorlib so we need to add typeforwarders for them.

Fixes https://github.com/dotnet/runtime/issues/48242

src/libraries/shims/manual/mscorlib.forwards.cs

index 696e938..874380a 100644 (file)
@@ -19,3 +19,6 @@
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OrdinalComparer))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UnitySerializationHolder))]
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractException))]
+// This is required for back-compatibility with legacy Xamarin which had Stack<T> and Queue<T> in mscorlib
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.Stack<>))]
+[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.Queue<>))]