使用 Swashbuckle.AspNetCore.CLI 运行 dotnet swagger tofile 时如何“跳过”异常

问题描述 投票:0回答:0

我正在使用

dotnet swagger tofile --output [output] [startupassembly] [swaggerdoc]
这个命令来生成swagger文档,这里是CLI的存储库,它在本地运行良好。

但是当它在 CI/CD 中时,据我所知,它需要启动应用程序,但由于一些依赖问题,应用程序不会在 CI/CD 中启动。因此,当应用程序在 CI/CD 上运行时,它会在

Program.Main
内抛出异常。

我的问题是,推荐的解决方案是什么?有没有办法跳过异常?或者甚至不启动应用程序?或者我应该配置要加载的依赖项

Main

c# asp.net .net swagger swashbuckle
© www.soinside.com 2019 - 2024. All rights reserved.