Build type: csproj for dotnet core.
Test framework: xUnit (v2.2 or v2.3)
Most of the projects I work with use multi-targeting - so a TargetFrameworks (plural) property rather than TargetFramework.
I have *sometimes* seen such projects manage to run tests - but most of the time they're broken. The tests themselves show up (so whatever analysis is being done to find the tests appears to work). Hitting "run tests" (either in the Test Runner, or Solution Explorer, or in source code) forces a build if necessary, but then no tests are actually run. Importantly (I suspect), the Output window does *not* show "Test started..." which it does when everything is working.
Restarting Visual Studio sometimes appears to "unstick" this, but not always. At one point I believed the problem was the order of the target frameworks (desktop first vs core first) but that appears not to be the case now...
The tests run fine from the command line.
Reducing the TargetFrameworks property to only have a single target (but keeping the property itself plural) makes everything work again.
- 17.1.4 : Download official update
We have resolved this issue and now tests in your project are running correctly. Please try this build and inform us about your results: