I'm trying to run the dotnet tool Swashbuckle.AspNetCore.Cli (5.6.3) in a Azure Devops build agent with only .NET 5
That doesn't work and I get the following error:
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.0.0' was not found.
- The following frameworks were found:
5.0.9 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.AspNetCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
I see that indeed there is no dll for .NET 5:
But I don't get it. The issue will be fixed if I have .NET Core 3.0 (or 3.1) installed, but why is that? What can't we run a tool like this on the .NET 5 runtime?
.NET 5 is the successor of .NET Core 3, so I expected that .NET Core 3 binaries are could be used by .NET 5.
PS: I know Swashbuckle.AspNetCore.Cli 6.x has a .NET 5 dll, but I need Swashbuckle v5 behavior and I'm trying to understand the underlying issue.