Swashbuckle.AspNetCore.Cli only targets .NET Core 2.1
See original GitHub issuePackage: Swashbuckle.AspNetCore.Cli Version: 5.0.0-rc3 Project Target Framework: netcoreapp3.0
Reproduction Steps:
- Create .NET Core 3.0 API project
- Configure
Swashbuckle.AspNetCore-5.0.0-rc3
- Run
dotnet tool run swagger tofile --output output/swagger.json bin/Release/netcoreapp3.0/MyWebApi.dll v1
Description:
I have a .NET Core 3.0 project that includes Swashbuckle.AspNetCore-5.0.0-rc3
that I am trying to use the CLI to build a swagger file for during the build process. I have tool included in my dotnet tools manifest and when I restore, it installs correctly. However when I run the command, I get the following. Since Swashbuckle.AspNetCore-5.0.0-rc3
supports netcoreapp3.0, I suspect the CLI should as well.
Tool 'swashbuckle.aspnetcore.cli' (version '5.0.0-rc3') was restored. Available commands: swagger
Restore was successful.
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
- The following frameworks were found:
3.0.0-rc1-19456-20 at [/opt/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:15 (8 by maintainers)
Top Results From Across the Web
.net core - How to force Swashbuckle.Aspnetcore.Cli to use ...
I'm upgrading a project to use .Net Core 3.1 from 2.2, and am struggling with getting my tools working. I have this section...
Read more >Get started with Swashbuckle and ASP.NET Core
Learn how to add Swashbuckle to your ASP.NET Core web API project to integrate the Swagger UI.
Read more >Swashbuckle.AspNetCore
Swagger tooling for APIs built with ASP.NET Core. Generate beautiful API documentation, including a UI to explore and test operations, directly from your ......
Read more >Swashbuckle.AspNetCore.Cli 6.5.0
Version Downloads Last updated
6.5.0 739,076 7 months ago
6.4.0 1,292,126 7/19/2022
6.3.1 379,722 4/22/2022
Read more >Upgrading from .NET Core 2.1 to .NET 6.0
I upgraded an old project from .NET Core 2.1 to .NET 6. ... Essentially, this value is just used for CLI tools, but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just discovered you can use the environment variable:
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2
to work around this.https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md
Looks like they there is a
RollForward
property for the csproj file. I tried adding it to my own project file, but it did not work, so I’m thinking it needs to go on the Swashbuckle CLI project file.Have you tried this on a machine that doesn’t have .NET Core 2.x installed?