Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

Swashbuckle.AspNetCore.Cli not working in .net6

Open CheloXL opened this issue 4 years ago • 8 comments

Using 6.2.3 and running dotnet add package Swashbuckle.AspNetCore.cli, I get

error: NU1202: Package Swashbuckle.AspNetCore.Cli 6.2.3 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Swashbuckle.AspNetCore.Cli 6.2.3 supports:
error:   - net5.0 (.NETCoreApp,Version=v5.0) / any
error:   - net6.0 (.NETCoreApp,Version=v6.0) / any
error:   - netcoreapp2.1 (.NETCoreApp,Version=v2.1) / any
error:   - netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any
error: NU1212: Invalid project-package combination for Swashbuckle.AspNetCore.Cli 6.2.3. DotnetToolReference project style can only contain references of the DotnetTool type
error: Package 'Swashbuckle.AspNetCore.cli' is incompatible with 'all' frameworks in project 'xxx\Api.csproj'.

The project is an aspnet core api that was upgraded from 5 to 6 (simply by changing the TargetFramework to net6.0)

CheloXL avatar Dec 03 '21 12:12 CheloXL

Seeing the same.

OpenSpacesAndPlaces avatar Jan 19 '22 15:01 OpenSpacesAndPlaces

@domaindrivendev

OpenSpacesAndPlaces avatar Jan 19 '22 15:01 OpenSpacesAndPlaces

Temporary workaround was:

cd "project"
dotnet new tool-manifest
dotnet tool install --version 6.2.3 Swashbuckle.AspNetCore.Cli

OpenSpacesAndPlaces avatar Jan 19 '22 16:01 OpenSpacesAndPlaces

I have the same issue

ghost avatar Mar 30 '22 21:03 ghost

Any updates about support of Swagger cli for .net 6.0 to generate documentation on build.???

sagar-sk15 avatar Sep 12 '22 16:09 sagar-sk15

@sagar-sk15 I'm able to generate json documentation. You can see a example here

Clone this repo and run it or pull down the docker image from docker hub.

Hope that's what your after 👍

loanburger avatar Sep 12 '22 19:09 loanburger

@loanburger Thanks for response. are you able to generate it while building your project locally using vscode/visual studio? Let me try your example.

sagar-sk15 avatar Sep 14 '22 00:09 sagar-sk15

Mm I can't remember if it got generated at build time or run time but pull down that project and take a look.

loanburger avatar Sep 14 '22 00:09 loanburger

following, same problem with .NET7

Defkon1 avatar May 16 '23 14:05 Defkon1

This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.

github-actions[bot] avatar May 03 '24 01:05 github-actions[bot]

Please open a new issue if you still find this doesn't work with the latest version (6.5.0 right now).

martincostello avatar May 03 '24 06:05 martincostello