The unit test project has access to the 3.8 generator but is not making use of this fact.
The two integration test projects are using the 3.8 generator. They could use the 4.0 generator if a global.json file was added to this repo requiring .NET SDK 6 (if VS, requiring 2022).
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:
Watching the analyzer assembly list switch between Roslyn38 and Roslyn40 in VS2022:
VS2019 (screenshot is from an earlier test where the source generator hadn't moved to the Roslyn38 assembly yet):
global.json
file was added to this repo requiring .NET SDK 6 (if VS, requiring 2022).View the last commit by itself (6f3a7ecbc7b31a1a5236899b640b86a70d378a10) to see how the
incremental-generators
change is being integrated. In particular, theSourceGenerator.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:
Watching the analyzer assembly list switch between
Roslyn38
andRoslyn40
in VS2022:VS2019 (screenshot is from an earlier test where the source generator hadn't moved to the Roslyn38 assembly yet):