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

 

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