Autofac的Swashbuckle生成報錯 Microsoft.AspNetCore.Mvc.ApiExplorer.EndpointMetadataApiDescriptionProvider

錯誤內容:

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章