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)?
XML documentation comments - document APIs using /// comments | Microsoft Learn.
Just about every browser can open an XML file. In Chrome, just open a new tab and drag the XML file over. Alternatively, right click on the XML file and hover over "Open with" then click "Chrome". When you do, the file will open in a new tab.
XML documentation comments are a special kind of comment, added above the definition of any user-defined type or member. They are special because they can be processed by the compiler to generate an XML documentation file at compile time. The compiler generated XML file can be distributed alongside your .
To insert XML comments for a code element Do one of the following: Type /// in C#, or ''' in Visual Basic. From the Edit menu, choose IntelliSense > Insert Comment.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With