sebastienros / fluid

Fluid is an open-source .NET template engine based on the Liquid template language.
MIT License
1.4k stars 177 forks source link

Support for Roslyn Source Generators #610

Closed Xemrox closed 6 months ago

Xemrox commented 9 months ago

Projects like Scriban support the somewhat awkward environment of roslyn code generators through direct source linking/embedding.

See Source Embedding.

Is there any way to get fluid.core working with source generators? Maybe enable the same mechanism as scriban uses for fluid?

sebastienros commented 9 months ago

Working with source generators

As in being able to use Fluid from a source generator?

This doc seems to explain how to do that, have you tried it?

https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md#use-functionality-from-nuget-packages

mo3in commented 9 months ago

not working ...

lahma commented 9 months ago

Here's an example of of a source generator project utilizing Fluid as template engine.