Skip to content
  1. We help small teams achieve big things.
  2. Our Technical Fellow just became a Microsoft MVP!
  3. We run the Azure Weekly newsletter.
  4. We just won 2 awards.
  5. We just published Programming C# 8.0 book.
  6. We run the Power BI Weekly newsletter.
  7. Our NDC London 2020 talk is now available online!
  8. We are school STEM ambassadors.
Matthew Adams By Matthew Adams Co-Founder

[This post is now obsolete - you should look at updating to later versions of SpecFlow]

While you cannot yet use SpecFlow with netcore or netstandard projects, you can use new-style (dotnet) test projects that target net461, and reference netstandard projects-under-test from there.

We like to use XUnit as the underlying test provider in this scenario, and we do the following:

  1. Install the current SpecFlow VS 2017 extension into VS 2017
  2. Create a DotNetCore XUnit test project and perform any package updates offered to you (this handily sets up the VS2017 test environment properly)
  3. Change the <TargetFramework> in the .csproj file from dotnetcore2.x to net461 (or 462, or whatever, but 461 is a good safe lowest common denominator for most scenarios)
  4. Add the SpecFlow.XUnit package to your project
  5. Add an app.config file to configure XUnit code generation

You can now add feature files and generate steps in the normal way.

Matthew Adams

Co-Founder

Matthew Adams

Matthew was CTO of a venture-backed technology start-up in the UK & US for 10 years, and is now the co-founder of endjin, which provides technology strategy, experience and development services to its customers who are seeking to take advantage of Microsoft Azure and the Cloud.