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.

  1. Add the NuGet package SpecFlow.Tools.MsBuild.Generation with the same version as SpecFlow to your project.
  2. Remove all SpecFlowSingleFileGenerator custom tool entries from your feature files.(go to the file properties and delete the value for custom tool)
  3. 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.

  1. Reverted back the changes done to specflow extension. Eg: Tools->options->specflow and reverted back Enable Specflowsinglefilegenrator to True
  2. Cleared Nuget cache.
  3. Deleted the package folder.
  4. Upgraded/Freshly installed Nunit latest.
  5. Upgraded/Freshly installed Nunit3TestAdapter.

Step 4 was the most important step.