ayaports/community/dotnet6-build/msbuild_optional-systemsecurity.patch

33 lines
1.3 KiB
Diff
Raw Normal View History

2023-02-22 04:48:17 +00:00
From 06707ec777769f1756230caf54391302e4378777 Mon Sep 17 00:00:00 2001
Patch-Source: https://src.fedoraproject.org/rpms/dotnet6.0/blob/src/msbuild/rawhide/f/msbuild-no-systemsecurity.patch
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 21 Oct 2022 14:13:29 -0400
Subject: [PATCH 2/2] optional-systemsecurity
Fix mono-specific runtime crashes running msbuild. CoreCLR does not
load types that are not actually used/invoked at runtime, while mono
does. System.Configuration and System.Security are missing in
source-build builds, which breaks msbuild.
---
src/Shared/ExceptionHandling.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/msbuild/src/Shared/ExceptionHandling.cs b/src/msbuild/src/Shared/ExceptionHandling.cs
index 16a0576b5..1c7cd5967 100644
--- a/src/msbuild/src/Shared/ExceptionHandling.cs
+++ b/src/msbuild/src/Shared/ExceptionHandling.cs
@@ -153,7 +153,9 @@ namespace Microsoft.Build.Shared
internal static bool IsXmlException(Exception e)
{
return e is XmlException
+#if FEATURE_SECURITY_PERMISSIONS
|| e is XmlSyntaxException
+#endif
|| e is XmlSchemaException
|| e is UriFormatException; // XmlTextReader for example uses this under the covers
}
--
2.36.3