Doxygen cref doesn't work without full namespace (even for classes in same namespace)

25 Views Asked by At

I'm trying to use Doxygen (v1.10.0) to produce documentation for my C# code, but I can't get cross reference links to work, except if I qualify them with the full namespace. For references to other classes in the same namespace, this feels unnecessary and is less readable.

I can't find any info about this. I've seen issues mentioning various issues with Doxygen cref for generic classes (https://github.com/doxygen/doxygen/issues/5489) and links to different namespaces (https://github.com/doxygen/doxygen/issues/8487) but nothing about it not working for plain non-generic classes in the same namespace.

Here is the documentation source:

File GenerationSource.cs

namespace Runevision.LayerGen {
    /// <summary>
    /// Unity component that creates a <see cref="TopLayerDependency"/>. <br/>
    /// Unity component that creates a \ref TopLayerDependency. <br/>
    /// Unity component that creates a <see cref="Runevision.LayerGen.TopLayerDependency"/>. <br/>
    /// Unity component that creates a \ref Runevision.LayerGen.TopLayerDependency.
    /// </summary>
    public class GenerationSource : MonoBehaviour { }
}

File TopLayerDependency.cs

namespace Runevision.LayerGen {
    /// <summary>
    /// All generation starts with one or more top level dependencies at the root.
    /// </summary>
    public class TopLayerDependency { }
}

And this is the output (you can see in the sidebar that GenerationSource and TopLayerDependency are in the same namespace): enter image description here

(I'm using Doxygen Awesome theme, but I checked and the issue is the same without it.)

What am I missing?

Edit:

Here are the settings used that differ from the defaults (output of doxygen -x Doxyfile):

PROJECT_NAME           = LayerProcGen
PROJECT_NUMBER         = v0.1.0
PROJECT_BRIEF          = "Layer-based infinite procedural generation"
OUTPUT_DIRECTORY       = Doxygen
INLINE_INHERITED_MEMB  = YES
EXTRACT_STATIC         = YES
HIDE_SCOPE_NAMES       = YES
HIDE_COMPOUND_REFERENCE= YES
SORT_BRIEF_DOCS        = YES
SHOW_NAMESPACES        = NO
FILE_PATTERNS          = *.cs \
                         *.markdown \
                         *.md
RECURSIVE              = YES
EXCLUDE                = Unity/SaveState/FileBasedPlayerPrefs \
                         doxygen-awesome-css
EXCLUDE_PATTERNS       = */UnitTests/*
USE_MDFILE_AS_MAINPAGE = README.md
HTML_EXTRA_STYLESHEET  = doxygen-awesome-css/doxygen-awesome.css \
                         doxygen-awesome-css/doxygen-awesome-sidebar-only.css
HTML_COLORSTYLE        = LIGHT
GENERATE_TREEVIEW      = YES
GENERATE_LATEX         = NO
CLASS_GRAPH            = TEXT
0

There are 0 best solutions below