Reputation: 17
I am using the line Assert.IsNotNull(object);
in my code. I keep getting the error:
the name assert does not exist in the current content
Can someone please tell me what I'm missing?
Upvotes: 1
Views: 2075
Reputation: 62469
You need to add Microsoft.VisualStudio.QualityTools.UnitTestFramework
to your project references and add
using Microsoft.VisualStudio.TestTools.UnitTesting;
Upvotes: 4
Reputation: 1503859
Is sounds like you don't have an appropriate using
directive, such as
using NUnit.Framework;
in your code. The exact directive will depend on which unit testing framework you're using, of course. I'd expect you to get the same problem for other things though - particularly [Test]
attributes etc.
Upvotes: 4