.net - Saxon EE .Net 版本评估,验证 xsd 时出现 Method not found 异常
问题描述
我使用的是 Saxon 10.5 版 .net 评估版。当试图编译 xsd 时,它会抛出错误。
找不到方法:'无效 System.IO.FileStream..ctor(System.String,System.IO.FileMode,System.Security.AccessControl.FileSystemRights,System.IO.FileShare,Int32,System.IO.FileOptions)'。
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);
}
解决方案
我的猜测是您在不受支持的 .NET 版本上运行。
请注意(由于 IKVM 交叉编译器的限制),.NET Core 目前不支持 Saxon。
推荐阅读
- hibernate-annotations - 方法 addAnnotatedClass(Class
) 对于 Configuration 类型未定义 - java - 如何使用 jpa 枚举映射 Spring boot 为什么不在 DB 中保存枚举值在 DB 中保存枚举键
- amazon-web-services - AWS Codestar 在不破坏任何东西的情况下添加 RDS Postgres 数据库的正确方法
- c# - how to return two integer values in c#
- c# - MVC DropdownlistFor 在 null 上不恢复为默认值
- javascript - 将字符串在 JSON 数组中的出现求和并将其存储在单独的 JSON 数组中
- c# - 如何根据 Elastic Search DSL 的范围/过滤器进行优先级排序,以便可以过滤列表,首先显示可用性 > 60%,然后 <
- java - 如何使用 org.eclipse.swtbot.swt.finder.widgets.SWTBotTree.getNode(String nodeText,int index) 方法?
- sapui5 - 具有重用库的 MTA 应用程序
- asp.net-mvc - Replace font in Asp.net MVC Razor Page