用于多个 xsd 的 FSharp.Data ResolutionFolder 抛出 FS1109

问题描述

我正在尝试使用 XmlTypeProvider 来创建使用 xsd 结构的类型。 我已经启动了 VS2017 并在我很棒的脚本文件夹中保存了一个新的 fsx 文件。在同一个文件夹中,我有一个包含 FSharp.Data 3.3.3 版的包文件夹。 加载 dll 并打开它按预期工作。

就我而言,我有 3 个具有层次结构的 xsd 文档。我已将它们全部放在 fsx 文件旁边的一个名为 XSD 的文件夹中。尝试从这些 xsd 中的任何一个创建类型时,一切正常。我得到了类型,智能感知,全部。

阅读docs,如果有其他架构文件,建议使用ResolutionFolder参数(如果这意味着层次结构,则无法真正判断其他 -相关或不止一个)。

如果我尝试使用以下语法创建类型:

type Reconciliation = XmlProvider<ResolutionFolder = @"...\XSD",Schema=@"...\grandpa.xsd">

我收到以下错误

error FS1109: A refererence to the type
FSharp.Data.XmlProvider,ResolutionFolder="sameValue",Schema="sameValue"
in assembly FSharp.Data was found
but the type Could not be found in that assembly.

正如预期的那样,尝试其他 xsd 文件是徒劳的。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)