1
votes

I have installed latest version of Specflow(3.1.97), Nunit (3.1.97), MS Build Generator(3.1.97) in my visual studio 2017, I have created a feature file but its class file throwing errors.

I am getting below errors:

Version conflict - SpecFlow Visual Studio extension attempted to use SpecFlow code-behind generator 1.9, but project 'WpfApp3' references SpecFlow 3.1.

We recommend migrating to MSBuild code-behind generation to resolve this issue.

For more information see https://specflow.org/documentation/Generate-Tests-from-MsBuild/

Any help would be really appreciated.

1
Have you tried to follow the link? - Pavel Anikhouski
@PavelAnikhouski: The question says they are using the latest version of SpecFlow with MS Build Generation. - Greg Burghardt
The documentation the error message links to mentions a property of .feature files called Custom Tool (right-click on a .feature file, click properties). Make sure this value is empty. Also make sure the Enable SpecFlowSingleFileGenerator CustomTool setting in Tools -> SpecFlow is set to False. - Greg Burghardt

1 Answers

1
votes

Please let me know if this works. I think I have had the same problem and it was hard to resolve.

Try clearing these two property fields of your feature file

enter image description here

And then rebuild