From 7df4757511efc9e6a9adf80514cec2cfafd92d02 Mon Sep 17 00:00:00 2001 From: Ryland <41491307+ryalanms@users.noreply.github.com> Date: Thu, 18 Feb 2021 16:19:32 -0800 Subject: [PATCH] Use reflection-only context for InternalsVisibleToAttribute type comparison --- .../src/Shared/System/Windows/Markup/ReflectionHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs index 1589ae70064..b164a7e5b1a 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs @@ -505,7 +505,7 @@ internal static bool IsFriendAssembly(Assembly sourceAssembly) for (int j = 0; j < list.Count; j++) { - friendAssemblyName = GetCustomAttributeData(list[j], typeof(InternalsVisibleToAttribute), out typeValue, false, false, false); + friendAssemblyName = GetCustomAttributeData(list[j], GetMscorlibType(typeof(InternalsVisibleToAttribute)), out typeValue, false, false, false); if (friendAssemblyName != null && friendAssemblyName == LocalAssemblyName) { isFriend = true;