We help IT Professionals succeed at work.

[TestFixture] could not be found

5,002 Views
Last Modified: 2013-12-13
I am working with Nunit and I have added NUnit.Framework in my project and it does not recognize keywords like [TestFixture]  and [Test]. It gives me error that reference not found.
Comment
Watch Question

Commented:
Try copying the dll in the bin. Remove the current reference and add again pointing to the bin.
Miguel OzSenior Software Engineer
CERTIFIED EXPERT
Top Expert 2009

Commented:
Plese check your project as follows:
- Make sure you have added NUnit.Framework.dll as a project refererence. (In my case it is installed at C:\Program Files\NUnit 2.4.1\bin\nunit.framework.dll)
- On your code you need the follwing using directive:
using NUnit.Framework;

No need to copy this file to your bin.
then you can use it as per tutorial:
http://www.nunit.org/index.php?p=quickStart&r=2.4.1

Author

Commented:
Hmmmmmmm well I had followd wveryhting that you have said. I have used directive 'using NUnit.Framework;' and I had referred to the DLL 'NUnit.Framework'  but still it was not recoznizing the

[Test] and [TestFixture] attributes and surprisingly it was recognizing 'Assert' keyword which was exclusively NUnit keyword.

I am not sure why.

But now miraculously I restarted VS08 and it recognized those attribute keywords, I am not sure why and how.

Any idea why did  this happen?
Senior Software Engineer
CERTIFIED EXPERT
Top Expert 2009
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Lols thanks
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.