Proj0244: Generate documentation file
In order for code documentation to be visible for package consumers
it is important that the documentation is generated.
This can either be done by using the
<GenerateDocumentationFile>
or the <DocumentationFile>
tags.
This requires either <GenerateDocumentationFile>
to be set to true
,
or <DocumentationFile>
to be defined, while <GenerateDocumentationFile>
is not explicitly set to false
.
Non-compliant
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>true</IsPackable>
</PropertyGroup>
</Project>
Or:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>true</IsPackable>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<DocumentationFile>./docs.xml</DocumentationFile>
</PropertyGroup>
</Project>
Compliant
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>true</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
</Project>
Or:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>true</IsPackable>
<DocumentationFile>./docs.xml</DocumentationFile>
</PropertyGroup>
</Project>
Or:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>true</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>./docs.xml</DocumentationFile>
</PropertyGroup>
</Project>