I can run your snippet inside a console app in .net core 7 but changing the framework to .net standard 2.0 crash with :
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified
I'm using Visual Studio 17.5.0 Preview 2.0 with C# Tools 4.5.0-xxx and building an incremental source generator.
I can run your snippet inside a console app in .net core 7 but changing the framework to .net standard 2.0 crash with :
I'm using Visual Studio 17.5.0 Preview 2.0 with C# Tools 4.5.0-xxx and building an incremental source generator.
I think I need an unreleased Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0? https://www.damirscorner.com/blog/posts/20221014-VersionsOfSourceGeneratorDependencies.html
Downgrading to Visual Studio 17.4.3 did not worked.