Skip to content

Commit 2db0df9

Browse files
Fix .Net 10 SDK build issue when using internal members (#11296)
Fixes #11235 Co-authored-by: ThomasGoulet73 <[email protected]>
1 parent 3e08907 commit 2db0df9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlTypeMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2481,7 +2481,7 @@ private static bool IsFriendAssembly(Assembly assembly)
24812481

24822482
private static bool IsInternalAllowedOnType(Type type)
24832483
{
2484-
bool isInternalAllowed = ReflectionHelper.LocalAssemblyName == ReflectionUtils.GetAssemblyPartialName(type.Assembly) ||
2484+
bool isInternalAllowed = ReflectionUtils.GetAssemblyPartialName(type.Assembly).Equals(ReflectionHelper.LocalAssemblyName, StringComparison.Ordinal) ||
24852485
IsFriendAssembly(type.Assembly);
24862486
_hasInternals = _hasInternals || isInternalAllowed;
24872487
return isInternalAllowed;

src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/ReflectionHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ internal static bool IsFriendAssembly(Assembly sourceAssembly)
503503
#if PBTCOMPILER
504504
internal static bool IsInternalAllowedOnType(Type type)
505505
{
506-
return LocalAssemblyName == ReflectionUtils.GetAssemblyPartialName(type.Assembly) || IsFriendAssembly(type.Assembly);
506+
return ReflectionUtils.GetAssemblyPartialName(type.Assembly).Equals(LocalAssemblyName, StringComparison.Ordinal) || IsFriendAssembly(type.Assembly);
507507
}
508508
#endif
509509

0 commit comments

Comments
 (0)