dotnet8.0/fix-mono-typeloadexception....

24 lines
1.0 KiB
Diff

From 02f6303d86672997ec2e6b79b16d5ddbf52118a0 Mon Sep 17 00:00:00 2001
From: Tom Deseyn <tom.deseyn@gmail.com>
Date: Tue, 22 Aug 2023 14:52:36 +0200
Subject: [PATCH] Avoid loading System.Security.Permissions.
source-built Mono fails to load types from this assembly.
---
src/msbuild/src/Shared/ExceptionHandling.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/msbuild/src/Shared/ExceptionHandling.cs b/src/msbuild/src/Shared/ExceptionHandling.cs
index a7ef74e873..3dce645df1 100644
--- a/src/msbuild/src/Shared/ExceptionHandling.cs
+++ b/src/msbuild/src/Shared/ExceptionHandling.cs
@@ -167,7 +167,7 @@ internal static bool IsIoRelatedException(Exception e)
internal static bool IsXmlException(Exception e)
{
return e is XmlException
- || e is XmlSyntaxException
+ // || e is XmlSyntaxException
|| e is XmlSchemaException
|| e is UriFormatException; // XmlTextReader for example uses this under the covers
}