You can use the MSBuild Generation to generate the code-behind files. With that, you get the errors as normal build errors.
If you are on SpecFlow >= 2.3, you can simply add the SpecFlow.Tools.MSBuild.Generation
NuGet to your project and that should it be.
If you are on some earlier version, it is more complicated. So the best would be to update to the latest SpecFlow version.
Detailed documentation can be found here: https://docs.specflow.org/projects/specflow/en/latest/Tools/Generate-Tests-From-MsBuild.html
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…