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.
Hi Jon,
Thanks for the attached project. I have managed to reproduce the issue.
Please give us some time to research the issue in detail.