dotnet / roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.
https://josefpihrt.github.io/docs/roslynator
Other
3.09k stars 259 forks source link

error NU1202: Package Roslynator.DotNet.Cli 0.9.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0) #1532

Open muaz-jasman opened 2 months ago

muaz-jasman commented 2 months ago

Hi , last two weeks I run Roslynator cli 0.8.9 and it worked fine. However , its failed when I try to run it today. I tried to upgrade to roslynator cli version 0.9.0 but still received the same error.

the error message : exit status 1: The tool package could not be restored. Tool 'roslynator.dotnet.cli' failed to install. This failure may have been caused by:

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool /tmp/8e133bb3-0e02-49ba-99a5-dcb78425ae0c/restore.csproj : error NU1202: Package Roslynator.DotNet.Cli 0.9.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0) / any. Package Roslynator.DotNet.Cli 0.9.0 supports: /tmp/8e133bb3-0e02-49ba-99a5-dcb78425ae0c/restore.csproj : error NU1202: - net7.0 (.NETCoreApp,Version=v7.0) / any /tmp/8e133bb3-0e02-49ba-99a5-dcb78425ae0c/restore.csproj : error NU1202: - net8.0 (.NETCoreApp,Version=v8.0) / any

FYI , I run in Github,

josefpihrt commented 2 months ago

I was forced to drop support for .NET 6 SDK to be able to update to latest Roslyn version which does not support .NET 6. More info can be found here: https://github.com/dotnet/roslynator/pull/1483

You can either stay or 0.8.9 or install .NET 7 or 8 SDK on your environment. If you use Roslynator CLI in you GH pipeline it should be possible to upgrade to .NET 7 or 8 SDK unless there are some specific reasons why to use .NET 6.