1

Since some days the feature files are broken.

VS2017:

  • Colors dissapeard, everything is white.
  • When I press F12 nothing happens.
  • When I run the test from solution explorer the tests work fine.

VS2015:

  • Everything works fine.

What I tried to do:

Option 1: Run Binding Tool Right-click on the feature file Select "Run Custom Tool" This causes the SpecFlowSingleFileGenerator to regenerate the code-behind for your test framework.

Option 2: Restart Visual Studio Close Visual Studio Open Visual Studio Reopen solution This causes any bindings that haven't been cached to rerun.

Option 3: Clear SpecFlow Step Mapping Cache Close Visual Studio Open Windows Explorer Type %TEMP% in Address Bar and hit Enter Search for "specflow-stepmap-*.cache" Delete those files Open Visual Studio Reopen solution

Option4: Uninstall and reinstall visual studio 2017

None of them fixes the issues for VS2017.

Some help is more than welcome.

xxx2017
  • 207
  • 1
  • 5
  • 15
  • Related post - [Specflow error: Force regenerate steps possible?](https://stackoverflow.com/q/17167820/465053) – RBT Mar 09 '21 at 07:43

3 Answers3

0

I solved this issue by updating VS2017 to v15.6.1. Prior to that I've tried all the steps you mentioned and it did not work. Also, found this article: https://github.com/techtalk/SpecFlow/issues/1049 which is saying the same.

  • Hi, can you update please to 15.5.7? It is strange. For me worked with 15.6.1 but then due to app reasons I had to downgrade. – Alex Lazarciuc Mar 13 '18 at 15:19
0

These symptoms sound like you haven't installed Specflow extension on your VisualStudio 2017.

What happens when you dont have it is that VS can't work with feature files and can't navigate to anything when pressing F12. Tests are working because VisualStudio executes already generated NUnit tests from feature.cs files.

Double check your VisualStudio Tools -> Extensions And Updates -> Check in Installed if you have Specflow for Visual Studio 2017 installed and Enabled.

Note: Each time you install a new Visual Studio you have to install the extension.

valentinvs
  • 191
  • 1
  • 6
0

Came across the same issue, installed Specflow for Visual Studio 2017 from Tools >> Extensions And Updates and found as working fine.

Go the colours for feature file lines back and F12 is working fine.

Thanks.