I am writing a custom plugin to customise the auto-generated code files SpecFlow produces.
After building the solution and putting it in the 'lib' folder of the SpecFlow testing project. On saving the SpecFlow feature file I get
Specflow plugin : Generation error: Missing [assembly:GeneratorPlugin] attribute in 'path to dll'
Even though I have this marked up in the plugin Assembly
[assembly: GeneratorPluginAttribute(typeof(CustomGeneratorPlugin))]
Using reflection/self-testing I can load the assembly myself and resolve the attribute
Code is here -- https://github.com/chrismckelt/SpecFlowCustomPlugin
Any ideas whats causing this? Thanks
Resolved by adding the below 'path' attribute to the generator SpecFlow config section
<generator path=".\lib"
full config
<specFlow>
<generator allowDebugGeneratedFiles="false" allowRowTests="true" generateAsyncTests="false" path=".\lib" />
<runtime stopAtFirstError="false" missingOrPendingStepsOutcome="Ignore" />
<trace traceSuccessfulSteps="true" traceTimings="false" minTracedDuration="0:0:0.1" stepDefinitionSkeletonStyle="RegexAttribute" />
<plugins>
<add name="McKeltCustom" path=".\lib" type="GeneratorAndRuntime" />
</plugins>
<stepAssemblies>
<stepAssembly assembly="SpecFlow.Assist.Dynamic" />
</stepAssemblies>
</specFlow>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With