SpecFlow Visual Studio extension attempted to use SpecFlow code-behind generator 1.9
The following steps resolved the issue for me:-
Try Step 3 first to resolve the problem. If that doesnt do the trick, go from Step 1 onwards.
- Add the NuGet package SpecFlow.Tools.MsBuild.Generation with the same version as SpecFlow to your project.
- Remove all SpecFlowSingleFileGenerator custom tool entries from your feature files.(go to the file properties and delete the value for custom tool)
- Select Tools | Options | SpecFlow from the menu in Visual Studio, and set Enable SpecFlowSingleFileGenerator CustomTool to "false".
refer link
This issue did my head in. Basically the fix was simple. My specflow extension was modified to specflow 3.0 changes and this issue that I was getting was for a project on specflow 2.4.1 The steps that I did to fix was simple.
- Reverted back the changes done to specflow extension. Eg: Tools->options->specflow and reverted back Enable Specflowsinglefilegenrator to True
- Cleared Nuget cache.
- Deleted the package folder.
- Upgraded/Freshly installed Nunit latest.
- Upgraded/Freshly installed Nunit3TestAdapter.
Step 4 was the most important step.