Steven Digby
Steven Digby

Reputation: 85

Visual Studio 2017 With SpecFlow

I am running VS 2015 and VS 2017 side-by-side. I have installed TechTalk's SpecFlow from Nuget plus Nunit, the same on both VS versions. When I try to Add New Item a new feature file I can do this on VS 2015 but on VS 2017 I can't see the SpecFlow feature template, or, indeed, any SpecFlow template. The reference to specflow is definitely in the references; there's a configsetting in the app.config for Specflow.

How do I start with SpecFlow in VS 2017 [v15.2 (26430.16) Release; .NET 4.6.01055; SpecFlow v2.2.0] ? Is SpecFlow even usable on VS 2017?

Upvotes: 5

Views: 5765

Answers (3)

Pamador
Pamador

Reputation: 158

to use specflow in VS:

  • you need to install specflow extension (for your VS version)
  • then install specflow nuget package it's better to restart VS in between.
  • for version < 3, then make sure you have "Enable SpecflowSingleFile Generator" set to false in (tools>options>specflow)
  • for version 3 onward, set to true

Upvotes: 0

Steven Digby
Steven Digby

Reputation: 85

Andreas' answer is correct - the answer is to install the extension. However, the Download button on the URL above seems to do nothing, so it's best to install the extension from Visual Studio (select “Tools”, “Extensions and Updates…” from the menu. Click on "Online" on the left, and search for "SpecFlow") Make sure all your open instances of VS are closed down to complete the installation, then 'Modify'.

Upvotes: 2

Andreas Willich
Andreas Willich

Reputation: 5825

For item templates, intellisense and some other features you need to install the SpecFlow Visual Studio Extension in Visual Studio.

Extension for VS 2015: https://marketplace.visualstudio.com/items?itemName=TechTalkSpecFlowTeam.SpecFlowforVisualStudio2015

Extension for VS 2017: https://marketplace.visualstudio.com/items?itemName=TechTalkSpecFlowTeam.SpecFlowforVisualStudio2017

After installation you have the item templates available.

Upvotes: 8

Related Questions