SpecFlow.VisualStudio icon indicating copy to clipboard operation
SpecFlow.VisualStudio copied to clipboard

Renaming a step file causes the feature file editor in VS to think there are duplicate steps

Open xclayl opened this issue 9 years ago • 4 comments

  1. Create a feature file with steps
  2. Create a steps file (we use [Binding] & [Scope(Feature = "MyFeatureFile")] attributes)
  3. Paste "pending" steps into steps file
  4. Rename steps file in VS (don't rename the class automatically)
  5. Rename the steps class to match the filename

The feature file thinks the steps are duplicated in the VS editor. All the steps go back to being purple

xclayl avatar Feb 26 '16 20:02 xclayl

have you saved the class at any point in this process? If you save after 3 what happens?

I think the fix if you get into this state will be to delete the specflow-stepmap* files from %temp%

samholder avatar May 12 '16 21:05 samholder

@xclayl I just ran into a very similar problem when renaming a file. The solution for me was to restart Visual Studio. Now the steps are showing mapped to the appropriate step definitions files.

dcboycm avatar Apr 18 '17 18:04 dcboycm

Thanks dcboycm. That's what I've been doing too. Thanks for updating the issue.

xclayl avatar Apr 18 '17 18:04 xclayl

Yes Restart your Visual Studio, Binding will work again.

vishwanathshettyk avatar Aug 08 '17 06:08 vishwanathshettyk