NET Standard Class Library project for the code you want to package, or create a simple one as follows: In Visual Studio, choose File > New > Project, expand the Visual C# > . NET Standard node, select the "Class Library (. NET Standard)" template, name the project AppLogger, and click OK.
From the menu bar, choose Tools > Options to open the Options dialog box. Then, navigate to Text Editor > C# (or Visual Basic) > Advanced. In the Editor Help section, look for the Generate XML documentation comments option.
The problem was that I didn't check "Generate Xml Documentation" for the build configuration I was using. That nuspec is correct.
In .NET Core/Standard you can do this by editing the project XML file, for example:
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
This will output the documentation as an XML file next to your output assembly.
EDIT:
As a side note once you enable GenerateDocumentationFile
you will probably get lots of warnings on your public methods for not having added full documentation tags. If you want to disable these warnings simply add in the PropertyGroup
:
<NoWarn>$(NoWarn);1591</NoWarn>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With