Open UmaHarano opened 1 month ago
It seems be filtered out by following line. https://github.com/dotnet/docfx/blob/d0d5307d06edac3431e4e46073271f317357349a/src/Docfx.Dotnet/DotnetApiCatalog.ApiPage.cs#L439
Is there a solution or work around you can recommend? I cannot use project references.
As a temporary workaround.
Is is able to use conditional compilation
for docfx metadata
command?
docfx.json
"metadata": [
{
"properties": {
"DocfxMetadataBuild": "true"
}
],
ProjectB.csproj
<ItemGroup Condition="'$(DocfxMetadataBuild)' == 'true'">
<ProjectReference Include="..\ClassLibrary1\ProjectA.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(DocfxMetadataBuild)' != 'true'">
<Reference Include="ProjectA">
<HintPath>..\ClassLibrary1\bin\Release\net8.0\ProjectA.dll</HintPath>
</Reference>
</ItemGroup>
@filzrev Thanks for the work around. The main reason this won't work is because I am building a documentation site for 17+ dlls. It would be a maintenance issue to evaluate the extensions in them in order to add these compilation conditions.
Any chance this can be fixed in the next round of DocFX updates?
When using Assembly Reference.
It seems ReduceExtensionMethod
returns null
at following lines.
https://github.com/dotnet/docfx/blob/4d74101b977c0d13b5825c81414a059900eecfa3/src/Docfx.Dotnet/DotnetApiCatalog.ApiPage.cs#L439
Any chance this can be fixed in the next round of DocFX updates?
ReduceExtensionMethod
is implemented by Roslyn API.
So It would be difficult to fix on the docfx side.
I've found similar issue at Roslyn repository. But it seems not be resolved.
https://github.com/dotnet/roslyn/issues/11950
Thank you @filzrev for this info.
Discussed in https://github.com/dotnet/docfx/discussions/10063