How are XML comments of .NET source code stored in assembly metadata?

Have you noticed that for some methods in assemblies of the .NET system Reflector also shows the corresponding documentation? This means that documentation can be stored in assembly metadata.

How can I make it work for my own builds? Meaning, I want to see my comments on my method when I reflect it in the .NET Reflector.

Thanks.

+4
source share
1 answer

XML doc comments are not stored in assembly metadata. In fact, Visual Studio and other tools such as Reflector post XML document comments by looking at a set of known paths containing XML document comment files.

If you want to view the XML documentation for your own assemblies, make sure that the XML file is in the same directory as the assembly reference and has the same name as your assembly (except for the extension). For example, MyAssembly.Namespace.XML corresponds to the assembly MyAssembly.Namespace.dll .

See How to see XML comments from Reflector for more information.

+4
source

All Articles