All unit tests Inconclusive when run in VS 2019

Viewed 2893

I'm using Unit Test Explorer and Unit Test Sessions to run my tests and suddenly get the below error.

When running in Test -> Test explorer, the tests do not run at all and I see no errors.

In both cases there is nothing in Output window. I've reinstalled R#, cleared VS cache (in %USERPROFILE%\AppData\Local\Microsoft), restarted windows, restarted VS.

2019.10.25 14:54:08.058   ERROR Remote: An exception occurred while invoking executor 'executor://mstestadapter/v2': Method not found: 'Void Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.set_CancellationTokenSource(System.Threading.CancellationTokenSource)'.

--- EXCEPTION #1/1 [LoggerException]
Message = “Remote: An exception occurred while invoking executor 'executor://mstestadapter/v2': Method not found: 'Void Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.set_CancellationTokenSource(System.Threading.CancellationTokenSource)'.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.ReSharper.UnitTesting.MSTest.Provider.New.TestHost.TestHostMsTestRunner.TestExecutionEventHandler.HandleLogMessage(TestMessageLevel level, String message)
     at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleRequestSender.SendMessageAndListenAndReportTestResults(String messageType, Object payload, ITestRunEventsHandler eventHandler, ITestHostLauncher customHostLauncher)
    (...)
1 Answers

I've updated the NuGet packages MSTest.TestAdapter and MSTest.TestFramework to the newest version (v2.0.0) in the whole solution and the problem was solved.

Related