Create resource file using C# Source Generators

Viewed 383

I'm investigating using C# Source Generators for generating the boilerplate required for a specific program we write add-ins for. The boilerplate includes a C# class which I'm confident I can do with the generators but it also includes an embedded XML file which maps the functionality to static methods in the output dll.

Is there a way to output data that is not source code from the generator? In my specific case I need to create an embedded resource which contains an XML file.

I've looked through the Source Generators Cookbook but haven't found anything similar to the scenario I pose above.

0 Answers
Related