"Run All" on Unit Test (.Net Core) throws exception
Repro steps
Create a project -> .Net Core -> Unit Test Project (.Net Core) Add few tests
public void TestMethod1()
{
Assert.IsFalse(true);
}
Click Run All from the Test Explorer
Expected
Test executes with out any error / warning
Actual
------ Run test started ------
[xUnit.net 00:00:00.0437763] Exception discovering tests: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.Extensions.DependencyModel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.GetAvailableRunnerReporters(IEnumerable1 sources)
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.GetRunnerReporter(IEnumerable1 assemblyFileNames)
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.DiscoverTests[TVisitor](IRunSettings runSettings, IEnumerable1 sources, LoggerHelper logger, Func4 visitorFactory, Action4 visitComplete)
[xUnit.net 00:00:00.1597105] Catastrophic failure: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyModel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.Extensions.DependencyModel, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.GetAvailableRunnerReporters(IEnumerable1 sources)
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.GetRunnerReporter(IEnumerable1 assemblyFileNames)
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.RunTests(IRunContext runContext, IFrameworkHandle frameworkHandle, LoggerHelper logger, Func1 testCaseAccessor)
========== Run test finished: 3 run (0:00:02.7139478) ==========
All cached test adapters are passing to testhost.
If all projects in solution using same test framework, workaround: restart VS IDE.
Related to: https://github.com/Microsoft/vstest/issues/511
Related #543?
This is being tracked external to this repo here: https://developercommunity.visualstudio.com/content/problem/145929/run-all-on-unit-test-net-core-throws-exception.html
Does not repro on latest VS2017.5 Microsoft.Net.Test.SDK 15.5.0, & latest Xunit / MStest Adapters