The analyzer assembly 'TypealizR.SourceGenerators.dll' references version '4.4.0.0' of the compiler, which is newer than the currently running version '4.3.0.0'
latest version 0.5.2 is not compatible with clients which do not have the latest and greates .net-version installed.
This article here mostly describes the exact same situation: https://www.damirscorner.com/blog/posts/20221014-VersionsOfSourceGeneratorDependencies.html
I also tried to just bundle the used version of Microsoft.CodeAnalysis.CSharp with the analyzer (see this commit) but this then may fail due to multiple assemblies loaded within the same app-domain, where types cannot be interchanged.
Unhandled Exception: System.InvalidCastException:
[A]Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax cannot be cast to
[B]Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax.
Type A originates from 'Microsoft.CodeAnalysis.CSharp, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CodeAnalysis.CSharp.dll'.
Type B originates from 'Microsoft.CodeAnalysis.CSharp, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' in the context 'LoadFrom' at location 'C:\Users\[USERNAME]\.nuget\packages\typealizr\0.8.3\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.dll'.
To reproduce, just reference the (unlisted) [version 0.8.3 of my TypealizR-package](https://www.nuget.org/packages/TypealizR/0.8.3) in a fresh console-project on a machine, where the installed sdk already utilize 'Microsoft.CodeAnalysis.CSharp, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
version 0.5.3 will fix this, at least to be buildable by recent .net6-sdk versions
https://github.com/earloc/TypealizR/pull/37 did not work as intended
Issue wil pop-up again if v0.6.x is released wiothout a proper fix for this.
re-introduced in v0.8.2
https://github.com/dotnet/roslyn/issues/41421
I think this would solve the initial problem: https://github.com/dotnet/roslyn-sdk/issues/107
asked the pros over at https://github.com/dotnet/roslyn-sdk/issues/1056
This one here looks promising: https://github.com/dotnet/sdk/issues/20355