C#C
C#3y ago
nalka

❔ Can't get the source generators tutorial to work

As the title says, I'm following the source generators tutorial that's here : https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview

But when I launch my console app (.net 7) nothing is displayed, I'm most likely stuck with step 7 (linking the source generator with my console app) but at this point I really don't see what could be wrong given I have no errors nor warnings...

Like displayed on step 9, I have SourceGenerator in my console app's analyzers but there's nothing below it (so no SourceGenerator.HelloSourceGenerator and Program.cs that appear on the tutorial's screenshot)
Source Generators is a C# compiler feature that lets C# developers inspect user code as it is being compiled. Source generators create new C# source files on the fly that are added to the user's compilation.
Was this page helpful?