AccessViolationException at Xsl Transform

本文关键字:Transform Xsl at AccessViolationException | 更新日期: 2023-09-27 18:18:34

下面是执行xsl转换的代码。如果XSLT文件包含15个或更少的表,则代码可以正常工作。但是,当有超过15页时,它会给出以下错误:

试图读写受保护的内存。这通常表明其他内存已损坏。

                    using (var tw = new XmlTextWriter(xlsFileNameWithPath, System.Text.Encoding.UTF8))
                    {
                        tw.Formatting = Formatting.Indented;
                        tw.Indentation = 3;
                        tw.WriteStartDocument();
                        xsl.Transform(xmldoc, null, tw); //Performa XSLT transformation.
                    }

是否有任何限制的数量表或文件的大小转换?

AccessViolationException at Xsl Transform

我已经把我的项目从。net framework 3.5迁移到。net framework 4.5,这个问题已经不存在了。