YairHalberstadt / stronginject

compile time dependency injection for .NET
MIT License
845 stars 24 forks source link

Pack separate assemblies for Roslyn 3.8 and 4.0 and move original and incremental generators #181

Closed jnm2 closed 2 years ago

jnm2 commented 2 years ago

View the last commit by itself (6f3a7ecbc7b31a1a5236899b640b86a70d378a10) to see how the incremental-generators change is being integrated. In particular, the SourceGenerator.cs diff.

I tested the resulting .nupkg on my machine using VS 2019, VS 2022 with .NET SDK 5, VS 2022 with .NET SDK 6, Rider, and VS Code. They all showed diagnostics and recompiled properly during edits to the sample container class.

New package structure: image

Watching the analyzer assembly list switch between Roslyn38 and Roslyn40 in VS2022: switching_sdk_version

VS2019 (screenshot is from an earlier test where the source generator hadn't moved to the Roslyn38 assembly yet): image

YairHalberstadt commented 2 years ago

Amazing job, thanks!