1

I am creating tests in C# Selenium Specflow. My framework is fine and builds but when I add a Specflow Feature File and build my project I get the error:

Error CS0234 The type or namespace name 'TestFixtureSetUpAttributeAttribute' does not exist in the namespace 'NUnit.Framework' (are you missing an assembly reference?) Olympus D:\Selenium Projects\companyname framework for interviews\Olympus2\Tests\SpecFlowFeature1.feature 3 Active

The version of Specflow installed is v4.0.30319

Why does this error occur?

In my Base class I am using [BeforeScenario()] from TechTalk.SpecFlow; The error complains about TestFixtureSetUp. I am not using this attribute anywhere. This attribute I used to use before from Nunit Framework, this was few years ago before BDD.

Any help appreciated, thanks.

stuartd
  • 70,509
  • 14
  • 132
  • 163
Riaz Ladhani
  • 3,946
  • 15
  • 70
  • 127
  • try regenerating the c# code behind as a first step by running the custom tool on the feature file, or editing it in some way. Then have a look at the generated file for the Attribute. The name should be TestFixtureSetUpAttribute not TestFixtureSetUpAttributeAttribute. If it is then looks like there is a bug in the file generation tool for that version. – Mr. Bellis Apr 25 '19 at 17:25
  • I have run the custom tool and looked at the cs file of the feature file and it shows [NUnit.Framework.TestFixtureSetUpAttribute()]. I did a search for AttributeAttribute no results was returned. – Riaz Ladhani Apr 25 '19 at 17:32
  • I think this is answered [here](https://stackoverflow.com/questions/55691940/how-to-configure-specflow-3-0-199-with-nunit-3-11). – Mika Sundland Apr 26 '19 at 07:23

0 Answers0