TechTalk.SpecFlow.SpecFlowException:缺少[assembly:GeneratorPlugin]属性

问题描述

我现在正在学习SpecFlow。我正在尝试通过BookShop示例here进行操作,而我尝试运行所有测试则显示了构建错误

Error   MSB4018 The "GenerateFeatureFileCodeBehindTask" task Failed unexpectedly.
TechTalk.SpecFlow.SpecFlowException: Missing [assembly:GeneratorPlugin] attribute in 
C:\Users\john.robottom\.nuget\packages\specrun.specflow.3-40\3.4.5\build\\net471\SpecRun.Generator.SpecFlowPlugin.dll

我已经四处搜寻,但是我不清楚是否需要降级(如果是的话,降级什么以及如何降级),卸载并重新安装(什么)等。

解决方法

我看不到如何通过评论回答Greg的问题(它说我只有50分才能发表评论)。因此,这是我尝试回答Greg的问题(如果您需要其他信息,Greg,请告诉我):

  1. SpecFlow.Plus.LivingDocPlugin:3.4.2
  2. SpecRun.Runner:3.3.41
  3. 我正在使用Visual Studio 2019 Enterprise
  4. 我正在通过Viual Studio中的“测试资源管理器”运行测试。

基本上,我按照示例进行操作,并为示例中引用的任何软件包采用了最新的稳定版(截至几天前)NuGet软件包。 该示例位于:https://docs.specflow.org/projects/specflow/en/latest/Getting-Started/Getting-Started-With-An-Example.html