简体   繁体   中英

cs file not getting generated for SpecFlow feature file in Visual Studio

I'm working on SpecFlow tests in Visual Studio 2019. The designer file (.cs) doesn't get generated when the feature file is added.

Works on other machines with similar configuration and nuget packages.

The designer file should be generated automatically.

This is probably happening, because the generation of the code-behind file on saving is not enabled.

In the latest update of the VS Extension of SpecFlow we changed the default to false. The reason for it was, that it is a legacy function and you should switch to MSBuild Generation of the code-behind files.

Documentation for it: https://specflow.org/documentation/Generate-Tests-from-MsBuild/

To enable the feature again, you have to go to the options:

SpecFlow 选项屏幕


Full disclosure: I am one of the developer of SpecFlow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM