Source generator unable to resolve external type
I am writing a source generator to learn csharp and I stubbled into something strange.
Here is the
It generate mapping code for a class A to a class B and is used like so:
Am I missing something or is there a way to make this work without changing the attribute parameter to something else ?
Here is the
IncrementalValueProvider in my source generator:It generate mapping code for a class A to a class B and is used like so:
Everything work as expected as long as the attribute parameter (here typeof(Point3))) is accessible in the current package.
If the typeof attribute parameter lives in an external package the PopulateTyypeMapping method is never called by the IncrementalValueProvider`. I think I understand that the compiler is unable to resolve the class so it skip the attribute, but it's very puzzling that there is no error message or warning emitted at compile time.Am I missing something or is there a way to make this work without changing the attribute parameter to something else ?