You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Trying to document a source code which has attribute classes generated by the source generators.
Without generating attribute classes, docfx works without any error.
With attribute class, the build fails with error below
MyClass.cs(11,6): error CS0246: The type or namespace name 'ElementFactoryAttribute' could not be
found (are you missing a using directive or an assembly reference?)
To Reproduce
Steps to reproduce the behavior:
Create any sample Generator project and have it generate an attribute class; say ElementFactoryAttribbute
Create a project to use the generated classes and use the attribute on a class.
Create a docfx project and serve.
Expected behavior
The build to work with a generated attribute class.
Context:
OS: Windows Desktop
Docfx version: 2.75.1
Additional context
namespaceHelloWorldGenerated{/// <summary>/// Enter description here for class X./// ID string generated is "T:MyNamespace.MyClass"./// </summary>[ElementFactory]publicclassMyClass{/// <summary>/// Enter description here for the first constructor./// ID string generated is "M:MyNamespace.MyClass.#ctor"./// </summary>publicMyClass(){}/// <summary>/// Enter description here for the second constructor./// ID string generated is "M:MyNamespace.MyClass.#ctor(System.Int32)"./// </summary>/// <param name="i">Describe parameter.</param>publicMyClass(inti){}/// <summary>/// Enter description here for field Message./// ID string generated is "F:MyNamespace.MyClass.Message"./// </summary>publicstringMessage;}}
The text was updated successfully, but these errors were encountered:
paulushub
changed the title
[Bug] Roslyn Source Generators with attribute class fails
[Bug] Using Roslyn Source Generators with attribute class fails
Jan 17, 2024
Describe the bug
Trying to document a source code which has attribute classes generated by the source generators.
docfx
works without any error.To Reproduce
Steps to reproduce the behavior:
ElementFactoryAttribbute
Expected behavior
The build to work with a generated attribute class.
Context:
Additional context
The text was updated successfully, but these errors were encountered: