Open HavenDV opened 1 year ago
I guess I need to re-extract the NuGet archives myself, check the analyzers folder for dlls, open them, extract all generator classes, and use CSharpGeneratorDriver to update Compilation. I just want to make sure it's not already implemented
Should the generator added from NuGet package contribute to the expected generated sources? If yes, it will be quite breaking. Maybe a flag should be added along with this? In this case, this will be a sufficient solution for https://github.com/dotnet/roslyn-sdk/issues/1087 as well.
For now, I'm using the Microsoft.CodeAnalysis.Testing and ReferenceAssemblies class to resolve packages and add them to Compilation. But this does not work for packages that contain source code generators. Is there a way to add source code generators from a NuGet package using Roslyn or Testing packages?