Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 8, 2025

This PR adds comprehensive breaking change documentation for the System.Xml.Xsl.XsltSettings.EnableScript property being marked as obsolete with diagnostic ID SYSLIB0062 in .NET 10.

Changes Made

Breaking Change Documentation

  • New document: docs/core/compatibility/xml/10.0/xsltsettings-enablescript-obsolete.md
    • Documents the obsoletion with proper metadata and frontmatter
    • Explains version introduced (.NET 10 Preview 1), previous vs. new behavior
    • Provides clear migration guidance for developers
    • Follows the established breaking change template format

Documentation Updates

  • Updated TOC: Added XML and XSLT section to .NET 10 compatibility documentation
  • Updated index: Added entry to the main breaking changes index for .NET 10
  • Enhanced existing docs:
    • Added warning in script-blocks-using-msxsl-script.md about the obsoletion
    • Added note in code analysis rule ca3076.md about the property being obsolete

Code Sample Updates

  • Updated C# and VB.NET sample files to include warnings about EnableScript being obsolete
  • Added comments for both property assignment and constructor usage patterns
  • Maintained backward compatibility while alerting developers to the upcoming change

Context

XSLT script blocks are only supported in .NET Framework and have never worked on .NET Core or .NET 5+. The EnableScript property had no legitimate use case on modern .NET:

  • When set to false: simply skips script blocks (expected behavior)
  • When set to true: throws PlatformNotSupportedException at runtime

Obsoleting this API converts a runtime error into a build-time warning, providing better developer guidance.

Fixes #47504.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/core-libraries/10.0/obsolete-apis.md API obsoletions with non-default diagnostic IDs (.NET 10)
docs/core/compatibility/unsupported-apis.md Unsupported APIs on .NET Core and .NET 5+
docs/fundamentals/code-analysis/quality-rules/ca3076.md CA3076: Insecure XSLT Script Execution
docs/fundamentals/syslib-diagnostics/obsoletions-overview.md docs/fundamentals/syslib-diagnostics/obsoletions-overview
docs/fundamentals/syslib-diagnostics/syslib0061.md SYSLIB0061: System.Linq.Queryable.MaxBy and System.Linq.Queryable.MinBy taking an IComparer<TSource> are obsolete
docs/fundamentals/syslib-diagnostics/syslib0062.md SYSLIB0062 warning - XsltSettings.EnableScript is obsolete
docs/navigate/tools-diagnostics/toc.yml docs/navigate/tools-diagnostics/toc
docs/standard/data/xml/script-blocks-using-msxsl-script.md Script blocks Using msxsl:script

@dotnet-policy-service dotnet-policy-service bot added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Sep 8, 2025
@Copilot Copilot AI changed the title [WIP] [Breaking change]: System.Xml.Xsl.XsltSettings.EnableScript Property marked as Obsolete Document XsltSettings.EnableScript property obsolescence in .NET 10 Sep 8, 2025
Copilot finished work on behalf of gewarren September 8, 2025 18:21
@Copilot Copilot AI requested a review from gewarren September 8, 2025 18:21
@gewarren gewarren marked this pull request as ready for review September 8, 2025 21:35
@gewarren gewarren requested a review from a team as a code owner September 8, 2025 21:35
@gewarren gewarren requested a review from jeffhandley September 8, 2025 21:35
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @gewarren

@gewarren gewarren merged commit 2196ce4 into main Sep 9, 2025
10 checks passed
@gewarren gewarren deleted the copilot/remove-obsolete-xsltsettings-property branch September 9, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-data/svc dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Breaking change]: System.Xml.Xsl.XsltSettings.EnableScript Property marked as Obsolete
3 participants