How do you get the XML documentation to show for a referenced C# library?

倾然丶 夕夏残阳落幕 提交于 2019-12-07 00:41:14

问题


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)?


回答1:


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

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.



来源:https://stackoverflow.com/questions/4200802/how-do-you-get-the-xml-documentation-to-show-for-a-referenced-c-sharp-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!