Why does Visual Studio 2019 run tests in dotnet core 1.0 even though my projects target dotnet core 2.2?

This is not an answer, but posting to help others landing here.

Visual Studio team has acknowledged the issue and is looking into fixing this. It's best to follow it here:

  • Issue at VS Developer Community: https://developercommunity.visualstudio.com/content/problem/579073/test-discovery-reporting-dlls-do-not-match.html
  • Related issue on GitHub: https://github.com/MicrosoftDocs/visualstudio-docs/issues/1305

I had the problem after upgrading from a netframework project to netcore.

Using VS Enterprise 16.3.8, cleaning the solution as well as deleting all temporary folders such as bin and obj helped me to get the tests running in the desired netcore version.

Edit:
As a sidenote VS has sometimes problems, when changing the target framework. After changing it deleting the bin / obj could sometimes be your last escape.