I know there is already a similar questions regarding this concern but those are already at least a year old.
I know also that this functionality is still not supported in .NET6 so what I am asking here is a workaround as we are currently converting our .NET framework codes to .NET6.
XslCompiledTransform xslt = new XslCompiledTransform();
XsltSettings sets = new XsltSettings(true, true);
var resolver = new XmlUrlResolver();
var styleSheetUri = @"C:\Users\xxxxx\buildCardtypeProd.xslt";
//the line below is throwing an exception (XSLT compile error; Compiling jscript/ csharp scripts is not supported in .net core)
xslt.Load(styleSheetUri, sets, resolver);
I already tried the nugets below but it is still throwing the same exception.
- Mvp.Xml
- Mvp.Xml.NetStandard