Show comments in nuget package
You have to enable the XML-Documentation when building.
See here
In Project-Properties go to the Build-Tab and select Xml-Documentationfile.
Looks similiar to this
For .NET Core and recent versions of VisualStudio, checking "XML Documentation file" will add an absolute path, as discussed here. This appears to be a bug, and it's preventing NuGet packages from including documentation.
The solution is to add the following to the .csproj
file, and un-check the "XML Documentation file" box.
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
A target was recently added to the SDK so that if this value is true, and DocumentationFile
is empty (i.e., the checkbox is not set in Visual Studio), it will just "do the right thing" and generate the documentation file in the output folder that NuGet expects.
There is currently no way to do this from the Visual Studio UI; a request to make that change is still being discussed as of the time of this writing.
Update: It looks like the setting for this is now available as a preview feature in Visual Studio.