Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
Swashbuckle.AspNetCore.Cli not working in .net6
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)
Seeing the same.
@domaindrivendev
Temporary workaround was:
cd "project"
dotnet new tool-manifest
dotnet tool install --version 6.2.3 Swashbuckle.AspNetCore.Cli
I have the same issue
Any updates about support of Swagger cli for .net 6.0 to generate documentation on build.???
@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 Thanks for response. are you able to generate it while building your project locally using vscode/visual studio? Let me try your example.
Mm I can't remember if it got generated at build time or run time but pull down that project and take a look.
following, same problem with .NET7
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.
Please open a new issue if you still find this doesn't work with the latest version (6.5.0 right now).