© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
24 replies
bakk

❔ Source code generator with reference to the main project

I have some methods in a project that I want to go through using reflection at compile time to generate some code for them. It seems like source code generators need to be in their own project(?), so I made a project for them in the same solution. The main project uses the generators project. Now, need to access the methods from the main project, but if I reference the main project from the generators project, I would get a circular dependency! Any idea how I would do this?
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 generator
C#CC# / help
3y ago
❔ Referencing new projects with the main project
C#CC# / help
3y ago
Compilation issue with source generator
C#CC# / help
14mo ago
✅ Include Source Generator With Library
C#CC# / help
16mo ago