xUnit Tests skipped

Viewed 2285

In my VS2017 solution I have several unit test projects. In on of them my xUnit tests do not get discovered by mstest and therefore are not run.

I do get the warning:

Warning: [xUnit.net 00:00:00.7641189] Skipping: Testing.UnitTests (could not find dependent assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0')

But Microsoft.VisualStudio.QualityTools.UnitTestFramework is referenced in the project in exactly that version. I have multiple unit testing projects. Many of them contain xUnit tests as well, but they get found and executed without any problems.

All projects containing xUnit tests have the same xUnit nuget packages assigned, especially xunit.runner.visualstudio

I am also using NCrunch and NCrunch has no problem discovering and execution the xUnit tests in question.

What could possibly be the reason to my problems?

Further Findings:

  • After upgrading Microsoft.VisualStudio.QualityTools.UnitTestingFramework to version 10.1.0.0, the xUnit tests were found but then I suddenly had 438 from 2447 failing. Those failing tests -mostly not xUnit - were previously working fine.
  • After shutting down an restarting visual studio the UnitTeestingFramework was automatically reset to version 10.0.0
  • opening the Reference Manager (Add References) all the project references are shown by selected checkboxes except of Microsoft.VisualStudio.QualityTools.UnitTestingFramework which only shows up if I previously add e.g. "Quality" to the search box, but then I see Microsoft.VisualStudio.QualityTools.UnitTestingFramework three times. One checked (version 10.0.0.0) an other one with same version, but different path and one with version 10.1.0.0

All together looks quite odd to me...

1 Answers
Related