Search code examples
c#visual-studiodllview-helperscode-documentation

How to add help documentation on a method in a C# dll?


I want to add help/documentation text to a library that I am building in C#. I am using /// to create the tags and this works just fine when I use methods of my library in my lirary proyect. For example:

if my library have 2 classes Car and Person, if a I type in Person

Car.StartEngi

the auto complete of VS will suggest to use StartEngine methos and I will see the summary that for the method, fro example "This method will start the engine of the car".

But the issue comes when I compile and try to reference the dll on a separate solution. In the new solution I have already add the corresponding reference and using statement but when I write

Car.StartEngi

VS will indeed recommend to use StartEngine BUT I can not see the documentation. Does anyone know why? Do I need to add some parameter when I build the library?

P.D All the methods in the library that generates the dll are public


Solution

  • On the Build page of your project settings you need to turn on "XML documentation file". If you copy the XML documentation file along with your assembly then you should be able to see the documentation in other projects.