1 | initial version |
Yes, it is possible to use C# source generators to generate code in a separate project. You can create a class library project that contains the source generator and reference it from the project where you want to generate code. You can then specify the output directory for the generated code using the AdditionalFiles
parameter in the GeneratorDriver.Create
method. This allows you to generate code in a separate project and use it in your application.