Open MarkStega opened 3 weeks ago
When generating API metadata from DLLs. It requires documentation XML files to extract comments.
What would happen if the following lines were added to .csproj
.
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
@filzrev
That works, however:
1) Why does specifying the csproj as input work without having that entry?
2) This 'hint' needs to be added to the DocFx documentation
Thanks for the help...
Why does specifying the csproj as input work without having that entry?
When generating docs from csproj.
docfx run code analysis to C# source code
. (It's executed on memory. and DLL is no generated)
So separated documentation xml files are not needed.
On the contrary, when generating docs from DLL files. docfx manually loading documentation xml files. https://github.com/dotnet/docfx/blob/4d5949af96797a34d418f3fcb6b31f63392df5de/src/Docfx.Dotnet/CompilationHelper.cs#L201C2-L201C21
@filzrev
Thanks very much for explaining the difference in the two methods.
I think all that is needed now is a minor documentation update.
Describe the bug When I create a doc site using DocFx I get different results if I reference a DLL versus a CSPROJ. Using the DLL as a metadata source looses the '///' comments
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect the output to be the same or that documentation be added that states that /// comments aren't available when metadata is extracted from a DLL
Context (please complete the following information):
Additional context Add any other context about the problem here.