检测到意外错误。检查测试输出窗格以获取详细信息(Resharper停止构建)

问题描述 投票:2回答:2

如果我暂停Resharper我的构建工作。但是,使用Resharper,我在构建时收到以下消息。

unexpected error detected. Check the Tests Output Pane for details 

测试输出窗格显示

2/07/2018 10:53:31 AM Informational] ------ Discover test started ------
[2/07/2018 10:53:32 AM Informational] ========== Discover test finished: 18 found (0:00:01.692) ==========
[2/07/2018 10:54:24 AM Error] System.MissingMethodException: Method not found: 'Microsoft.VisualStudio.TestWindow.Extensibility.ITestContainer Microsoft.VisualStudio.TestWindow.Controller.ITestContainerProvider.FindTestContainer(System.String, System.Uri)'.
   at JetBrains.ReSharper.UnitTestProvider.MSTest11.New.JetDiscoveryOperation.<GetTestContainersFor>d__21.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection)
   at System.Linq.EnumerableExJet.ToSet[TSource](IEnumerable`1 source)
   at JetBrains.ReSharper.UnitTestProvider.MSTest11.New.JetDiscoveryOperation.GetTestContainers(IEnumerable`1 sources)
   at JetBrains.ReSharper.UnitTestProvider.MSTest11.New.JetDiscoveryOperation.GeTestContainersAndRetry(IEnumerable`1 sources)
   at JetBrains.ReSharper.UnitTestProvider.MSTest11.New.JetDiscoveryOperation.ExecuteInternalCore()
   at JetBrains.ReSharper.UnitTestProvider.MSTest11.New.JetDiscoveryOperation.<ExecuteInternal>b__6()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.TestWindow.Controller.Operation.<ExecuteWithEvents>d__40.MoveNext()
[2/07/2018 10:54:24 AM Informational] ------ Discover test started ------
[2/07/2018 10:54:25 AM Informational] ========== Discover test finished: 18 found (0:00:00.595) ==========

Ť

visual-studio resharper
2个回答
2
投票

The same issue修复了ReSharper 2018.1版本。


0
投票

如果您的resharper版本无法更新到2018.1,则另一个选项是简单地暂停Resharper以允许编译成功。构建完所有内容后,您可以重新启用resharper并运行单元测试而不会出现问题。

您可以通过转到“工具”菜单并选择“选项”来禁用resharper。向下滚动并选择Resharper - > General。单击“立即暂停”按钮。构建成功后,您可以单击“继续”按钮。

© www.soinside.com 2019 - 2024. All rights reserved.