Reputation: 170479
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?
Upvotes: 28
Views: 6610
Reputation: 1062492
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.
Upvotes: 20
Reputation: 79
This is the XML documentation for that assembly. This is only used for Intellisense in VisualStudio. Refer this answer for details.
Upvotes: 6