© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•8mo ago•
22 replies
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:
- src/Shared/Localization.Shared (https://github.com/hailstorm75/NETLocalization/blob/master/src/Shared/Localization.Shared/Localization.Shared.csproj)
- src/Generators/Localization.Generator (https://github.com/hailstorm75/NETLocalization/blob/master/src/Generators/Localization.Generator/Localization.Generator.csproj)

and for the usage of the generator you can either look at
exp/Exp.Console
exp/Exp.Console
or
exp/Exp.WPF
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Source generators VSCode
C#CC# / help
2y ago
System.Text.Json Source Generators
C#CC# / help
3y ago
Source Generators In Nuget Packages
C#CC# / help
3y ago
generating code without source generators
C#CC# / help
3y ago