Closed amis92 closed 5 years ago
The behavior is now documented: https://github.com/AArnott/CodeGeneration.Roslyn/wiki/Features#codegenerationattributeattribute
Snippet:
A member annotated with an attribute (that in turn was annotated with
CodeGenerationAttributeAttribute
) is recognized by the Engine; the type of code generator is read from attribute'sCodeGenerationAttributeAttribute
constructor parameter. This is eithertypeof(x)
expression which requires code generator to live in the same assembly as the generator, or a string constant containing fully qualified type name, e.g.CodeGeneration.Roslyn.Tests.Generators.EmptyPartialGenerator, CodeGeneration.Roslyn.Tests.Generators
. If you omit the assembly name (after comma), it'll resolve to the same assembly as the one in which the attribute itself was declared.
https://github.com/AArnott/CodeGeneration.Roslyn/blob/b889381999dd62ed03cc4051b07a2dd63dbedc88/src/CodeGeneration.Roslyn/DocumentTransform.cs#L161