NeVeSpl / NSourceGenerators

MIT License
0 stars 0 forks source link

IIncrementalGenerator vs ISourceGenerator #1

Open ignatandrei opened 3 weeks ago

ignatandrei commented 3 weeks ago

I maintain a list of Roslyn Source Code Generators at ignatandrei.github.io/RSCG_Examples/v2/docs/List-of-RSCG

However, the source generators have been deprecated in favor of the new incremental generators , that allows better performance

See dotnet/roslyn@main/docs/features/incremental-generators.md

However this means passing from ISourceGenerator to IIncrementalGenerator

Could you do that ?

Thanks Andrei

NeVeSpl commented 3 weeks ago

As far as I remember, incremental generators do not work with .net framework projects. I still need this source generator to be compatible with legacy projects thus changing it to incremental is not an option right now.

ignatandrei commented 3 weeks ago

I do not think that is such a limitation. What version of .NET Framework are you thinking about?

NeVeSpl commented 3 weeks ago

.net framework 4.8

ignatandrei commented 3 weeks ago

I have tested with one of my generators and the console project

v4.7.2

It works.