dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.36k stars 4.74k forks source link

[API Proposal]: Obsolete XsltSettings.EnableScript #108287

Open chrarnoldus opened 1 month ago

chrarnoldus commented 1 month ago

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

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.

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/area-system-xml See info in area-owners.md if you want to be subscribed.