Obsoleting the API aids people migrating from .NET Framework to modern .NET, because it turns a runtime error into a build error/warning.
API Proposal
namespace System.Xml.Xsl;
public sealed class XsltSettings
{
[System.Obsolete("XSLT Script blocks are not supported on .NET Core or .NET 5 or later.")]
public bool EnableScript { get; set; }
}
API Usage
N/A
Alternative Designs
The API could be removed entirely, but this is undesirable because it is a binary breaking change.
Risks
Low, this is not a binary breaking change and there are probably no legitimate uses of EnableScript left as XSLT scripting is no longer supported.
Background and motivation
XSLT Script blocks are supported only in .NET Framework, they are not supported on .NET Core or .NET 5 or later as documented here: https://learn.microsoft.com/en-us/dotnet/standard/data/xml/script-blocks-using-msxsl-script
Obsoleting the API aids people migrating from .NET Framework to modern .NET, because it turns a runtime error into a build error/warning.
API Proposal
API Usage
N/A
Alternative Designs
The API could be removed entirely, but this is undesirable because it is a binary breaking change.
Risks
Low, this is not a binary breaking change and there are probably no legitimate uses of
EnableScript
left as XSLT scripting is no longer supported.