有一个有趣的一个。我在C#中记录了使用XML文档注释的方法。我想使用该指令包含引用文件的所有内容。我记录了一段代码,该代码接收格式化为XML文档的字符串,我希望在参数文档中包含XSD文件。

这工作正常,因为它在我期望的视觉工作室生成的XML中。这是XML的片段:

    /// <param name="xml">XML string - see Test.xsd <include file="XSD/Test.xsd" path="/*"/> After file include</param>
. 但是,当我使用Sandcastle生成帮助文件时,未显示XSD文件的内容,但Sandcastle未报告任何错误。我试图使用文件名,即相对于帮助文件也是如此,即

但随着Visual Studio抱怨它找不到文件。我把它们放在两个地方,仍然没有出现包含的文件。

任何想法?

有帮助吗?

解决方案

The include tag is processed at compiler time, so the generated XML file should contain all of its referred contents. Hence you have to put your XSD folder relative to the C# source file, then the compiler won't show any errors. After this, Sandcastle will be able to create the help file from the single XML document.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top