From 31a8a96ff92c462339d2bb4ad26b486bba07c232 Mon Sep 17 00:00:00 2001 From: Rami Date: Tue, 19 Mar 2024 11:52:27 -0700 Subject: [PATCH] Fixed "Value cannot be null. (Parameter 'args')" Fixes #5452 --- .../Microsoft.Xml/Xml/schema/XmlSchemaException.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/dotnet-svcutil/lib/src/FrameworkFork/Microsoft.Xml/Xml/schema/XmlSchemaException.cs b/src/dotnet-svcutil/lib/src/FrameworkFork/Microsoft.Xml/Xml/schema/XmlSchemaException.cs index b0e20dccf76..3a1ba0a3517 100644 --- a/src/dotnet-svcutil/lib/src/FrameworkFork/Microsoft.Xml/Xml/schema/XmlSchemaException.cs +++ b/src/dotnet-svcutil/lib/src/FrameworkFork/Microsoft.Xml/Xml/schema/XmlSchemaException.cs @@ -99,14 +99,12 @@ internal XmlSchemaException(string res, string[] args, Exception innerException, internal static string CreateMessage(string res, string[] args) { - try + if (args == null) { - return string.Format(res, args); - } - catch (MissingManifestResourceException) - { - return "UNKNOWN(" + res + ")"; + return res; } + + return string.Format(res, args); } internal string GetRes