What's the XML file that comes together with a .NET assembly file?

.net, .net-assembly, xml

Solution

It is the code comments / IntelliSense file, and is used by the IDE (i.e. Visual Studio), not the runtime - it is where all the extended method / parameter / type descriptions etc come from.

You do not need to deploy it with your binary, but it does no harm either. It is also entirely optional in the IDE - just: IntelliSense will be less informative to you without it (it will just display the names and types, etc - not the more verbose method descriptions).

In your own library, use the /// syntax to write your own code comments, and enable the XML file generation in project-properties.

Problem

Many .NET assemblies are accompanied with an XML file. For example, `System.Web.WebPages.Razor.dll` comes together with `System.Web.WebPages.Razor.xml` that contains the following: ``` <?xml version="1.0" encoding="utf-8" ?> <doc> <assembly> <name>System.Web.WebPages.Razor</name> </assembly> <members> <member name="T:System.Web.WebPages.Razor.PreApplicationStartCode" /> <member name="M:System.Web.WebPages.Razor.PreApplicationStartCode.Start" /> <member name="T:System.Web.WebPages.Razor.RazorBuildProvider" /> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.#ctor" /> Much more elements follow... </members> </doc> ``` What's this XML for? Do I need it in runtime?

Original source

Related problems