你如何将XML文档显示引用C#库? [英] How do you get the XML documentation to show for a referenced C# library?

查看:171
本文介绍了你如何将XML文档显示引用C#库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设你有一个C#库与几个功能,所有记录与平时 ///<总结> 很好地填写。引用该项目将使得功能和参数的描述出现在Visual Studio的上下文帮助。但是,它可能有这个节目,如果你不引用项目本身,只是一个版本(并可能有内部文档的其他一些文件)?

Suppose you have a C# library with several functions, all documented with the usual /// <summary> filled out nicely. Referencing the project will make the function and parameter description appear in the Visual Studio contextual help. But is it possible to have this show if you don't reference the project itself, just a build (and potentially some other file that has the documentation inside)?

推荐答案

是的,有 - 库需要与tickbox检查XML文档文件建成(项目属性页)

Yes there is - the library needs to be built with the "XML Documentation file" tickbox checked (in the project property pages)

通过这个选项打勾构建过程现在将建立包含所有的XML文档的输出目录一个额外的XML文件 - 每当Visual Studio中通过文件引用程序集将加载并从该XML文件中显示的智能感知文件(如果可以找到)

With this option ticked the build process will now build an extra XML file in the output directory which contains all of the xml documentation - whenever Visual Studio references an assembly by file it will load and show intellisense documentation from this XML file (if it can be found).

您应该分发此文件一起(在同一个目录中)编译的库。

You should distribute this file alongside (in the same directory as) your compiled library.

这篇关于你如何将XML文档显示引用C#库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆