Rocky
Rocky

Reputation: 51

How to fix the CS0234 - Assembly Reference Missing

I'm setting up SPECFLOW BDD project and when i build my project, I get below error:

In reference folder: I have "nunit.framework"

Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'TestFixtureSetUpAttributeAttribute' does not exist in the namespace 'NUnit.Framework' (are you missing an assembly reference?) SpecFlow Project2 C:\Users\source\repos\SpecFlow Project2\SpecFlow Project2\TestFeature.feature 3 N/A

Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'TestFixtureSetUpAttribute' does not exist in the namespace 'NUnit.Framework' (are you missing an assembly reference?) SpecFlow Project2 C:\Users\source\repos\SpecFlow Project2\SpecFlow Project2\TestFeature.feature 3 N/A

Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'TestFixtureTearDownAttributeAttribute' does not exist in the namespace 'NUnit.Framework' (are you missing an assembly reference?) SpecFlow Project2 C:\Users\source\repos\SpecFlow Project2\SpecFlow Project2\TestFeature.feature 12 N/A

Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'TestFixtureTearDownAttribute' does not exist in the namespace 'NUnit.Framework' (are you missing an assembly reference?) SpecFlow Project2 C:\Users\source\repos\SpecFlow Project2\SpecFlow Project2\TestFeature.feature 12 N/A

Upvotes: 1

Views: 2853

Answers (1)

Andreas Willich
Andreas Willich

Reputation: 5835

The SpecFlow Extension can't find the referenced SpecFlow version and falls back to the integrated generator (which is 1.9...).

Solution: use the MSBuild generation: https://specflow.org/2019/generating-code-behind-files-using-msbuild/

Upvotes: 1

Related Questions