Saxon EE .NET版本评估,验证XSD时出现未找到方法异常

brccelvz  于 2023-02-26  发布在  .NET
关注(0)|答案(1)|浏览(112)

我正在使用Saxon 10.5版本. NET评估版本。当试图编译XSD时,它会抛出以下错误。
未找到方法:"无效系统. IO.文件流..作用域(系统.字符串,系统. IO.文件模式,系统.安全性.访问控制.文件系统权限,系统. IO.文件共享,Int32,系统. IO.文件选项)"。

Processor processor = new Processor(true);
processor.SetProperty("http://saxon.sf.net/feature/timing", "true");
processor.SetProperty("http://saxon.sf.net/feature/validation-warnings", "false"); //Set to true to suppress the exception
SchemaManager manager = processor.SchemaManager;
manager.XsdVersion = "1.1";
manager.ErrorList = new List<StaticError>();
var samplesDir = new Uri(@"C:\saxon samples\samples\");
Uri schemaUri = new Uri(samplesDir, @"data/books.xsd");

try
{
    manager.Compile(schemaUri);
}
catch (Exception ex)
{
    Console.WriteLine(ex);
}
m2xkgtsf

m2xkgtsf1#

我猜您运行的是不受支持的. NET版本。
请注意(由于IKVM交叉编译器的限制),Saxon目前在.NET Core上不受支持。

相关问题