使用外部程序集时,SpecFlow 步骤绑定非常不稳定

SpecFlow step bindings very flaky when using an external assembly

正如标题所说,我在外部程序集中有步骤绑定。我使用以下方法将它们引入项目:

  <specFlow>
    <unitTestProvider name="xUnit" />
    <plugins>
      <add name="SpecFlow.xUnitAdapter" type="Runtime" />
    </plugins>
    <stepAssemblies>
      <stepAssembly assembly="MyOtherProject.StepBindings" />
    </stepAssemblies>
  </specFlow>

虽然 .feature 文件运行并且测试顺利通过,但所有步骤在 Visual Studio 编辑器中都显示为未绑定(紫色)并且点击 F12 会提供一个包含建议代码的对话框.

我需要做什么才能获得绑定步高亮?

这个post没有帮助:Specflow Binding from External Assembly always purple

我已经清除了 %TEMP%\VisualStudioTestExplorerExtensions 没有用。

列出了很多相同的问题

https://github.com/techtalk/SpecFlow/issues/220

https://github.com/techtalk/SpecFlow/issues/838

https://github.com/techtalk/SpecFlow/issues/648

https://github.com/techtalk/SpecFlow/issues/502

现在似乎没有人有兴趣解决这个问题。