Error with specflow in visual studio 2012 with <unitTestProvider>

11,128

Keep only one attribute as unitTestProvider name="SpecRun" or unitTestProvider name="NUnit" in app.config

This error is caused by two 'unitTestProviders' in app.config.

Share:
11,128
JoleG
Author by

JoleG

Updated on July 17, 2022

Comments

  • JoleG
    JoleG almost 2 years

    I am using selenium, Specflow and nUnit to run automated tests with visual studio. The code was working with visual studio 2010. After I installed visual studio 2012, selenium and Specflow again (I think I did it right), it stopped working. First, the steps didn't recognize their definitions and I think I fix it writing [Binding] in all the c# files that contains their definitions. Now when I try to build the project it shows an error that I can't solve to all feature files.

    It shows 50 errors (the same number of Specflow feature files I have), they are all the same, and it says this:

    Error: Generation error: SpecFlow configuration error -> The element <unitTestProvider> may only appear once in this section.

    I don't know how to fix this. I hope somebody can help me, I am really worry because of this.

  • Mukesh Nandeda Dhakad
    Mukesh Nandeda Dhakad over 10 years
    Thanks, this is a lot more obvious when you format the App.config.
  • Steve Smith
    Steve Smith over 6 years
    It would be good if the error message actually said what file it was referring to.