Open DoctorKrolic opened 1 year ago
You have to separately specify the version of Microsoft.CodeAnalysis you want to use for testing (by adding a package reference with an explicit version). The default/minimum one is Roslyn 1.x, which doesn't have packages compatible with net7.0.
This is by design, as it's required for the testing library to maintain support for Roslyn 1.x.
Is there any work being done to support .NET Core?
@peteraritchie I don't understand the question. The testing library has supported running tests on .NET Core for years.
it's required for the testing library to maintain support for Roslyn 1.x
If not a secret, why? Is it connected with VS 2015 lifecycle?
There are downstream analyzer packages which are built against an old version of Roslyn, and continue to work well in Visual Studio 2015 while also supporting the latest Visual Studio 2022. Over time there have been a variety of small internal changes in behavior, and it would not be sufficient for those projects to be restricted to testing execution against e.g. Roslyn 4.x+.
To reproduce:
Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit
v1.1.1 (the latest currently available)Your
.csproj
should look like this after 2 previous steps: