Preprocessor directives
If you have code inside a preprocessor directive (for example, #if MY_CONSTANT <code> #endif) and you want this code to have its API documented, you can use the Package Manager Doc Tools (PMDT) preprocessor directives to make sure that it generates documentation for these APIs.
PMDT adds the PACKAGE_DOCS_GENERATION directive to all generated code projects submitted to DocFX when it generates the API documentation, so you can add this to your code (for example, #if MY_CONSTANT || PACKAGE_DOCS_GENERATION <code> #endif).
Or, you can tell PMDT which preprocessor directives to enable when it generates the documentation.
Specify additional preprocessor directives in package metadata.