Closed desjoerd closed 6 months ago
Related: dotnet-getdocument issues in .NET7 on the ASP.NET Core repository.
The workaround I describe there requires modifying the application code so your pull request is probably a much better approach!
I'm just a bit worried that this project looks currently inactive. Last commit and last comment from @domaindrivendev dates back to January, 11. In the meantime, issues and pull requests are piling on. 😕 I hope this is only temporary. 🤞
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.
Thanks for your help with this - the fix is available in Swashbuckle.AspNetCore 6.6.2.
Currently the CLI is running all registered Hosted Services (
IHostedService
). I see that it's needed to start the application because otherwise theapp.Use*
/app.Map*
configuration is not run. Because it's starting the application (with a NoopServer) it is running all registered HostedServices.Because the CLI is almost always run in the context of a build it would be nice to not run those registered hosted services. This would also solve instances of for example HangFire or other things which start an IHostedService.
I've got a fix which I would like to discuss. It's a bit dirty but it works in my tests.