© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
ewilliams

Source Generators In Nuget Packages

I’m working on a source generator and initially thought it wasn’t working. I was adding it to another project via a private nuget package. I ended up including a direct project reference and walla, the generator started kicking in and shows up in the analyzers.

I cracked open the Nuget package and noticed there was no lib folder.

So what’s the correct way to publish a nuget package for a source generator project? And what’s the correct way to include said nuget into another project.
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

Nuget packages
C#CC# / help
15mo ago
Source generators VSCode
C#CC# / help
2y ago
Nuget private source
C#CC# / help
4y ago
Help with NuGet Packages
C#CC# / help
2y ago