From: Sebastien Pouliot Date: Thu, 2 Apr 2015 19:43:33 +0000 (-0400) Subject: [linker] Ensure updated Scope for exported types (e.g. unlinked PCL facade assemblies... X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=7934663bb834e35e0f9d192d8574fc903695bcdf;p=mono.git [linker] Ensure updated Scope for exported types (e.g. unlinked PCL facade assemblies in a Nuget) [#28617] --- diff --git a/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs b/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs index 9bd2bad9344..d7be23ac9e3 100644 --- a/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs +++ b/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs @@ -144,6 +144,16 @@ namespace Mono.Linker.Steps { scope = assembly.MainModule.Import (td).Scope; hash.Add (tr, scope); } + if (assembly.MainModule.HasExportedTypes) { + foreach (var et in assembly.MainModule.ExportedTypes) { + var td = et.Resolve (); + IMetadataScope scope = et.Scope; + if ((td != null) && Annotations.IsMarked (td)) { + scope = assembly.MainModule.Import (td).Scope; + hash.Add (td, scope); + } + } + } // Resolve everything first before updating scopes. // If we set the scope to null, then calling Resolve() on any of its