How to Configure Specflow 3.0.199 with NUnit 3.11?

前端 未结 2 667
你的背包
你的背包 2021-01-25 23:22

I have done this a couple of times before, but it\'s not working today. Am I missing something?

I want to configure Specflow from the scract, using NUnit and to execute

2条回答
  •  独厮守ぢ
    2021-01-25 23:52

    For SpecFlow 3 you have to use the MSBuild generation.

    To this, follow these two steps:

    1. Add the NuGet package SpecFlow.Tools.MsBuild.Generation with the same version as SpecFlow to your project
    2. Remove all SpecFlowSingleFileGenerator custom tool entries from your feature files.

    From https://specflow.org/2019/generating-code-behind-files-using-msbuild/

    Background what is happening:

    The VS Extension has sometimes problems to find the used SpecFlow version. In that case, it falls back to the SpecFlow version shipped with the extension (which is really old). This version is generating code with now not existing NUnit attributes.

提交回复
热议问题