錯誤內容:
An exception was thrown while activating Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator -> Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollectionProvider -> λ:Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider[] -> Microsoft.AspNetCore.Mvc.ApiExplorer.EndpointMetadataApiDescriptionProvider.
Autofac 的 Swashbuckle 生成中生成錯誤,
版本:VS2022 17.9.2,Swashbuckle 6.5.0
解決方案:
將VS2022版本降低到17.8.7,重新啓動項目,完美解決。
VS下載地址:Visual Studio 2022 發行歷史記錄 | Microsoft Learn
資料參考:https://developercommunity.visualstudio.com/t/With-the-latest-upgrade-to-VS-2022-v179/10540911?sort=newest&viewtype=all