© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
21 replies
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 - C#
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.
Source Generators - C#
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
Source Generators don't generate the files to the set CompilerGeneratedFilesOutputPath
C#CC# / help
3y ago
Testing the output of source generators
C#CC# / help
3y ago
Visual Studio doesn't work as expected with source generators [Answered]
C#CC# / help
4y ago