dotnet / dotnet/docfx

How to get Extension Methods to display when using assembly references

Open
#10,117 4 comments 9 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 9m
Merged PRs (30d)
11

Description

### Discussed in https://github.com/dotnet/docfx/discussions/10063

Originally posted by **UmaHarano** July 3, 2024
I am having issues with extension methods to be listed in the base class.
I have two csproj files in my solution:
* Project A with a "Map" class.
* Project B in the same sln has a "MappingExtensions" class that defines extension methods for the Map class that is defined in Project A.

### Issue
* If Project B has a "project reference" to Project A:
Project A's Map class apiPage yml I generate using DocFX lists the extension methods defined in Project B.
* If Project B has a assembly reference to Project A:
Project A's Map class apiPage yml I generate using DocFX **_does not_** list the extension methods defined in Project B. This is the issue.

The problem is my code base only uses "Assembly reference". So I am missing all the extension methods. Is there a solution or work around you can recommend? I cannot use project references.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.