7

How can I load XSLT file from string in ASP.NET Core?

In full .NET Framework I can use:

XslCompiledTransform objXSLTransform = new XslCompiledTransform();    
objXSLTransform.Load(strXSLTFile); 
3
  • iirc it's not implemented yet in .NET Core and you'll have to wait till .NET Core 2.0. Or grab the current 2.0 preview. Or just target .NET Framework >=4.5. Also see this issue github.com/dotnet/corefx/issues/5593 Commented Apr 11, 2017 at 7:58
  • 2
    @Tseng Can I find some 3rd part library? Commented Apr 11, 2017 at 8:02
  • Not that I am aware off (besides out of scope of SO). Commented Apr 11, 2017 at 8:10

1 Answer 1

8

As I mentioned here in details, you need to upgrade your .NET Core 1.x app to .NET Core 2.0, because .NET Core 2.0 implements .NET Standard 2.0, which has System.Xml.Xsl namespace supported again. And you will be able to use XslCompiledTransform again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.