Solution 1:

Add the NUnit test adapter NuGet package to your test projects

  • 2.* (https://www.nuget.org/packages/NUnitTestAdapter/)
  • 3.* (https://www.nuget.org/packages/NUnit3TestAdapter/)

Or install the Test Adapter Visual Studio extension. There is one for

  • 2.* (https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnitTestAdapter)
  • 3.* (https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnit3TestAdapter).

I prefer the NuGet package, because it will be in sync with the NUnit version used by your project and will thus automatically match the version used in any build server.

Solution 2:

You need to install NUnitTestAdapter. The latest version of NUnit is 3.x.y (3.6.1) and you should install NUnit3TestAdapter along with NUnit 3.x.y

To install NUnit3TestAdapter in Visual Studio 2017, follow the steps below:

  1. Right click on menu Project → click "Manage NuGet Packages..." from the context menu
  2. Go to the Browse tab and search for NUnit
  3. Select NUnit3TestAdapter → click Install at the right side → click OK from the Preview pop up

Enter image description here