我正在编写一个自定义插件来自定义 SpecFlow 生成的自动生成的代码文件。
在构建解决方案并将其放入 SpecFlow 测试项目的“lib”文件夹中之后。在保存 SpecFlow 功能文件时,我得到
Specflow plugin : Generation error: Missing [assembly:GeneratorPlugin] attribute in 'path to dll'
即使我在插件程序集中标记了这个
[assembly: GeneratorPluginAttribute(typeof(CustomGeneratorPlugin))]
使用反射/自测试我可以自己加载程序集并解析属性
代码在这里——https://github.com/chrismckelt/SpecFlowCustomPlugin
有什么想法是什么原因造成的?谢谢