From cf675ceaa852e2b1c472ec5a139e243faefa4925 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 07:24:05 +0000 Subject: [PATCH 1/7] Initial plan From a580ccd63f8650e2fd4bf319edc388fd9a0d4d2e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 08:05:33 +0000 Subject: [PATCH 2/7] Add SYSLIB0062 obsoletion for XsltSettings.EnableScript Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com> --- docs/project/list-of-diagnostics.md | 1 + src/libraries/Common/src/System/Obsoletions.cs | 3 +++ src/libraries/Directory.Build.targets | 3 ++- .../src/System/Xml/Xsl/Xslt/QilGeneratorEnv.cs | 2 ++ .../src/System/Xml/Xsl/Xslt/XslAstAnalyzer.cs | 2 ++ .../System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs | 2 ++ .../System.Private.Xml/src/System/Xml/Xslt/XsltSettings.cs | 1 + .../System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.cs | 1 + 8 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 0b3da600c53b13..a2c723876088e2 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -116,6 +116,7 @@ The PR that reveals the implementation of the ` are obsolete. Use the new ones that take an IComparer\. | +| __`SYSLIB0062`__ | XSLT Script blocks are not supported on .NET Core or .NET 5 or later. | ## Analyzer Warnings diff --git a/src/libraries/Common/src/System/Obsoletions.cs b/src/libraries/Common/src/System/Obsoletions.cs index cbba37ed07be17..be347c5e9390a7 100644 --- a/src/libraries/Common/src/System/Obsoletions.cs +++ b/src/libraries/Common/src/System/Obsoletions.cs @@ -195,6 +195,9 @@ internal static class Obsoletions internal const string QueryableMinByMaxByTSourceObsoleteMessage = "The Queryable MinBy and MaxBy taking an IComparer are obsolete. Use the new ones that take an IComparer."; internal const string QueryableMinByMaxByTSourceObsoleteDiagId = "SYSLIB0061"; + internal const string XsltSettingsEnableScriptMessage = "XSLT Script blocks are not supported on .NET Core or .NET 5 or later."; + internal const string XsltSettingsEnableScriptDiagId = "SYSLIB0062"; + // When adding a new diagnostic ID, add it to the table in docs\project\list-of-diagnostics.md as well. // Keep new const identifiers above this comment. } diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index 9998e676c5870e..4cd519598057b6 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -31,8 +31,9 @@ SYSLIB0025: SuppressIldasmAttribute. SYSLIB0032: HandleProcessCorruptedStateExceptionsAttribute. SYSLIB0036: Regex.CompileToAssembly + SYSLIB0062: XsltSettings.EnableScript --> - $(NoWarn);SYSLIB0003;SYSLIB0004;SYSLIB0015;SYSLIB0017;SYSLIB0021;SYSLIB0022;SYSLIB0023;SYSLIB0025;SYSLIB0032;SYSLIB0036 + $(NoWarn);SYSLIB0003;SYSLIB0004;SYSLIB0015;SYSLIB0017;SYSLIB0021;SYSLIB0022;SYSLIB0023;SYSLIB0025;SYSLIB0032;SYSLIB0036;SYSLIB0062 - $(NoWarn);SYSLIB0003;SYSLIB0004;SYSLIB0015;SYSLIB0017;SYSLIB0021;SYSLIB0022;SYSLIB0023;SYSLIB0025;SYSLIB0032;SYSLIB0036;SYSLIB0062 + $(NoWarn);SYSLIB0003;SYSLIB0004;SYSLIB0015;SYSLIB0017;SYSLIB0021;SYSLIB0022;SYSLIB0023;SYSLIB0025;SYSLIB0032;SYSLIB0036