services.AddSwaggerGen() giving error

后端 未结 4 402
情书的邮戳
情书的邮戳 2021-01-01 10:06

All I\'m trying to do is add swagger to an ASP.Net Core application. I\'m watching a tutorial and all I see them do is add services.AddSwaggerGen(); under the c

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 11:06

    For the .Net core project, you need to install Four packages. Better to use Nuget package manager so it takes appropriate needed versions.

    Microsoft.OpenApi
    Swashbuckle.AspNetCore.Swagger
    Swashbuckle.AspNetCore.SwaggerGen
    Swashbuckle.AspNetCore.SwaggerUI
    

提交回复
热议问题