Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specflow plugin : Generation error: Missing [assembly:GeneratorPlugin] attribute in

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

like image 913
Chris McKelt Avatar asked Sep 12 '13 07:09

Chris McKelt


1 Answers

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>
like image 140
Chris McKelt Avatar answered Nov 18 '22 06:11

Chris McKelt