Tôi đang sử dụng Unit Test Explorervà Unit Test Sessionsđể chạy thử nghiệm và đột nhiên gặp lỗi dưới đây.
Khi chạy vào Test -> Test explorer, các bài kiểm tra hoàn toàn không chạy và tôi thấy không có lỗi.
Trong cả hai trường hợp không có gì trong Outputcửa sổ. Tôi đã cài đặt lại R #, xóa bộ nhớ cache VS (trong %USERPROFILE%\AppData\Local\Microsoft), khởi động lại các cửa sổ, khởi động lại 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)
(...)