diff --git a/src/linker/Linker.Steps/SweepStep.cs b/src/linker/Linker.Steps/SweepStep.cs index cd9b17f3e3ad..c9415cfdb014 100644 --- a/src/linker/Linker.Steps/SweepStep.cs +++ b/src/linker/Linker.Steps/SweepStep.cs @@ -925,7 +925,10 @@ void UpdateScopeOfTypeReference (TypeReference type) // // Resolve to type definition to remove any type forwarding imports // - TypeDefinition td = resolver.TryResolve (type); + // Workaround for https://github.com/mono/linker/issues/2260 +#pragma warning disable RS0030 // Do not used banned APIs + TypeDefinition td = type.Resolve (); +#pragma warning restore RS0030 // Do not used banned APIs if (td == null) { // // This can happen when not all assembly refences were provided and we