Skip to content

XSLTs are not possible in NativeAOT #84389

Description

@eerhardt

Today to do XSLTs we have XslCompiledTransform. But this class will only ever use IL Ref.Emit to generate the transform. This is not possible when publishing for Native AOT - Ref.Emit won't work.

We also have XslTransform which sounds like it would be a good substitute when IsDynamicCodeSupported=false. However, we have an analyzer that tells devs that this class is not secure and shouldn't be used - XslCompiledTransform should be used instead. https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5374

So developers who need to use XSLTs in NativeAOT apps don't have a viable option in .NET.

We should solve this somehow - either by making XslCompiledTransform work in Native AOT, or by making XslTransform secure. (Probably the first approach would be best.)

cc @agocke, @MichalStrehovsky, @jkotas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions