M
There's a manual for DocFX here: https://dotnet.github.io/docfx/tutorial/walkthrough/walkthrough_create_a_docfx_project_2.html In order to connect XML-documentation to DocFX, it is necessary to add to sources either *.csproj of the project (for the documentation to come from the source) or collected files *.dll (for the documentation to be obtained from *.xml files that were compiled by the compiler near DLL). The first method is usually better, but it requires the established Visual Studio 2019 in the car where documentation is collected, even if the project itself is in a more old version.This is an example of docfx.json using XML-documentation:{
"metadata": [
{
"src": [
{
"files": ["*.dll"],
"src": "MyLib/bin/Debug/"
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "docs",
"globalMetadata": {
"_appTitle": "My Lib"
},
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default"
],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false
}
}
Here the original data for documentation are XML files for all DLL from the catalogue. MyLib/bin/Debug/, files .md from the catalogue of articles and images from the image catalogue. (With the fact that DLL is considered to be DLL in json reference files, the information will actually come from XML files.)For project-based generation, the metadata section will need to be changed to:"metadata": [
{
"src": [
{
"files": [
"MyLib/**.csproj"
],
"exclude": [
"**/bin/**",
"**/obj/**"
]
}
],
"dest": "api"
}
]