Nunit - doesn't discover tests [no error-message]

You must either install the NUnit VSAdapter vsix extension, or add the adapter as nuget package to your solution.

The latest version is the 2.0, and the vsix is available here: https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d

And the nuget package can be found here: http://www.nuget.org/packages/NUnitTestAdapter/

More information on these options can be found in this MSDN ALM post http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/11/part-3-unit-testing-with-traits-and-code-coverage-in-visual-studio-2012-using-the-tfs-build-and-the-new-nuget-adapter-approach.aspx, which also points to two earlier posts.

If you look in the Output console window under Test, the adapter name and version is displayed there as it run. If it doesn't come up, the adapter is not active.

If you run Resharper, ensure you have the latest 8.2 version, there has been conflicts earlier with the test adapters and resharper.

Even if you can't upgrade this project from NUnit 2.5.9 to latest 2.6.4, you can verify the adapters work correctly in a test project using 2.6.4.
I just checked on my own machine with NUnit 2.5.9, and that worked nice with the 2.0 adapter.

Update:

For VS2017 you dont install the NUnit VSAdapter vsix extension, instead install the NUnit 3 TestAdapter for Visual Studio 2012 (Update 1) onwards. This works with NuGet package: NUnit 3.9.0.

Update 2 - June 2019 Just released the 2.2 version of the NUnit2 Adapter. It should now work properly with SDK type projects, and with VS 2017 and 2019.


Mine is just like the same, but the different was I created my project as VS UnitTest project and not a plain DLL. So I created a DLL and referenced all the nunit assemblies and the test are now discovered.

Hope this helps.


I had this same problem when upgrading from Visual Studio 2013 to VS 2017. In my case, all the tests were written for NUnit 2 (not 3) and worked fine in VS 2013. Once VS2017 was installed, none of the tests could be found.

The problem is that VS2017 did not automagically pick up the NUnit 2 install on my VM.

The solution was to install the Nunit 2 test runner by clicking on the Tools menu, Tools | Extensions and Updates. Next select Online on the right-hand list and then enter "NUnit" in the Search box. You can then add the appropriate NUnit test runner.

This probably applies to all test runners except perhaps MSTest.