C#C
C#6mo ago
Denis

✅ Incremental Source Generators failing due to shared lib reference

https://github.com/hailstorm75/NETLocalization

Hi, for some reason my source generators fail with the following message:
SC: Warning CS8784 : Generator 'TranslationsSourceGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Localization.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'.

Unfortunately, I'm not quite sure what the issue might be. I've tried various changes to the referenced packages; however, that didn't really help. Sometimes it builds no problem - after re-adding references or restarting source generators. But then it goes back to failing.

The libraries of interest are:
and for the usage of the generator you can either look at exp/Exp.Console or exp/Exp.WPF (https://github.com/hailstorm75/NETLocalization/tree/master/exp)

Any help is very appriciated.

Extra context: I'm migrating from the now obsolete source generator to incremental generators
Was this page helpful?