How do you get the XML documentation to show for a referenced C# library?
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 po开发者_开发问答ssible 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)?
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.
精彩评论