Mufu.SpecFlow.DotNetCoreFix 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Mufu.SpecFlow.DotNetCoreFix --version 1.0.2
NuGet\Install-Package Mufu.SpecFlow.DotNetCoreFix -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mufu.SpecFlow.DotNetCoreFix" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mufu.SpecFlow.DotNetCoreFix --version 1.0.2
#r "nuget: Mufu.SpecFlow.DotNetCoreFix, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mufu.SpecFlow.DotNetCoreFix as a Cake Addin
#addin nuget:?package=Mufu.SpecFlow.DotNetCoreFix&version=1.0.2

// Install Mufu.SpecFlow.DotNetCoreFix as a Cake Tool
#tool nuget:?package=Mufu.SpecFlow.DotNetCoreFix&version=1.0.2

.NET Core fix for SpecFlow

This is a fix for anybody trying to use SpecFlow with .NET Core 2.0, inspired by the work of SpecFlow.DotNet and SpecFlow.xUnitAdapter.

Currently, SpecFlow doesn't officially support .NET Core, despite ongoing work in that area. Until that offical support arrives, this fix allows you to run SpecFlow as part of a .NET Core test suite.

Installation

Install the latest release candidate from NuGet:

Install-Package Mufu.SpecFlow.DotNetCoreFix -IncludePrerelease

If you're running SpecFlow on anything other than NUnit, you need to use version 2.2.0 of SpecFlow or newer and have a specflow.json file in your test project. This file must be set to be copied to your output folder on every build and is used to configure your test runner (e.g. xunit):

{
    "specflow": {
        "unitTestProvider": {
            "name": "xunit"
        }
    }
}

You must also add this property your test project to make sure your copy of the SpecFlow assembly sits in your output folder alongside the specflow.json file.

<PropertyGroup>
    
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
    
</PropertyGroup>

How it works

This project is an extension to MSBuild which invokes the specflow.exe tool during the build process. The tool generates the *.feature.cs files normally produced by the SpecFlow extension to Visual Studio.

The specflow.exe tool runs using the .NET Framework and only works on .NET Framework projects. The DotNetCoreFix package generates a shadow project using the classic project structure, including an app.config file configured to the test framework you're using, and copies in all the *.feature files from your project. The output *.feature.cs files are added to the source files for the build, so the unit tests appear in the compiled assembly.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.3 2,460 5/29/2018
1.1.2 2,331 5/27/2018
1.0.3 2,727 4/12/2018
1.0.3-alpha 2,237 3/27/2018
1.0.2 2,263 2/15/2018
1.0.1 2,365 2/14/2018
1.0.0 2,324 2/14/2018
1.0.0-rc4a 2,289 11/2/2017
1.0.0-rc4 2,105 11/1/2017
1.0.0-rc3 2,110 10/25/2017
1.0.0-rc2 2,065 10/23/2017

Added full support for binding generated test files to their source  .feature files.