No test found. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again

I am in the process of upgrading our existing solution to .Net 4.6.1 and have been unable to get our unit tests to run during a server build. Locally they run as expected and flipping the framework version back to .Net 4.5.1 makes them run again on the server.

I am getting the following error:

No test found. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.

I have reproduced the problem in a simpler setup:

  • Solution with a single C# Unit Test project with two tests (one failing, one passing).
  • XAML build definition using the Default Template (TfvcTemplate.12.xaml)
  • TFS 2015 Update 1 XAML build server with Visual Studio Enterprise 2015 Update 1 installed (have six similar servers and all produce the same result)

You can try to change your default processor architecture in your Test Setting from X86 to X64. In my case this was the problem.

This happens if the platform target of your project under test is set to x64.

Screenshot of test settings


My build was not finding the tests either. My setup and solution for finding the tests are as follows.

I use VSTS (Visual Studio Team Services) and have a build that is configured to refresh the NUGET packages on every build. I am using NUnit and found that running the following NUGET command (from the package manager console in Visual Studio) to add NUnitTestAdapter library to my test project and the checking in the packages.config made the tests run in my VSTS build.

Install-Package NUnitTestAdapter

As Maurice mentions in the Comment to this post for NUnit3 use the following NUGET package (Look for other utils on the link. i.e: dotnet CLI and Paket CLI)

Install-Package NUnit3TestAdapter

Hope this helps.