Visual Studio 2017 C 本地单元测试框架不起作用



场景如下:

  1. 我创建了一些解决方案,Windows X64 Console App
  2. 我写了一些类,主文件等,没有什么特别的
  3. 我在此解决方案中创建测试项目
  4. 我在解决方案属性中更改:所有对x64的平台(这似乎没有改变任何东西,只是说(

就是这样,我不会向测试项目添加任何参考。我要在测试项目文件中留下VS生成的所有内容,因为我想构建测试项目失败,并且得到以下堆栈:

[2018-03-27 13:32:48 Informational] ------ Discover test started ------
[2018-03-27 13:32:48 Error] System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformV2()
[2018-03-27 13:32:48 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
[2018-03-27 13:32:48 Informational] ========== Discover test finished: 0 found (0:00:00,0055039) ==========
[2018-03-27 13:32:48 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
--- 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.RequestFactory.<ExecuteRequest>d__10.MoveNext()
--- 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.RequestFactory.<Execute>d__11.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Wait(Int32 timeout)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose(Boolean disposing)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose()
   at Microsoft.VisualStudio.TestWindow.Controller.RequestFactory.<Execute>d__11.MoveNext()
--- 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.<ExecuteRequestAsync>d__38.MoveNext()
--- 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.DiscoveryOperation.<StartDiscoverTests>d__15.MoveNext()
--- 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.DiscoverSelectedOperation.<ExecuteInternal>d__8.MoveNext()
--- 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()
[2018-03-27 13:33:22 Informational] ------ Discover test started ------
[2018-03-27 13:33:22 Warning] Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run: 
UnitTest1.dll is built for Framework None and Platform X64.
 Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings.
[2018-03-27 13:33:22 Error] System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformV2()
[2018-03-27 13:33:22 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
[2018-03-27 13:33:22 Informational] ========== Discover test finished: 0 found (0:00:00,003502) ==========
[2018-03-27 13:33:22 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
--- 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.RequestFactory.<ExecuteRequest>d__10.MoveNext()
--- 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.RequestFactory.<Execute>d__11.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Wait(Int32 timeout)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose(Boolean disposing)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose()
   at Microsoft.VisualStudio.TestWindow.Controller.RequestFactory.<Execute>d__11.MoveNext()
--- 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.<ExecuteRequestAsync>d__38.MoveNext()
--- 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.DiscoveryOperation.<StartDiscoverTests>d__15.MoveNext()
--- 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.DiscoverSelectedOperation.<ExecuteInternal>d__8.MoveNext()
--- 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()
[2018-03-27 13:36:04 Informational] ------ Discover test started ------
[2018-03-27 13:36:04 Error] System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformV2()
[2018-03-27 13:36:04 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
[2018-03-27 13:36:04 Informational] ========== Discover test finished: 0 found (0:00:00,0030025) ==========
[2018-03-27 13:36:04 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
--- 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.RequestFactory.<ExecuteRequest>d__10.MoveNext()
--- 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.RequestFactory.<Execute>d__11.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Wait(Int32 timeout)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose(Boolean disposing)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose()
   at Microsoft.VisualStudio.TestWindow.Controller.RequestFactory.<Execute>d__11.MoveNext()
--- 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.<ExecuteRequestAsync>d__38.MoveNext()
--- 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.DiscoveryOperation.<StartDiscoverTests>d__15.MoveNext()
--- 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.DiscoverSelectedOperation.<ExecuteInternal>d__8.MoveNext()
--- 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()
[2018-03-27 13:36:12 Informational] ------ Discover test started ------
[2018-03-27 13:36:12 Error] System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformV2()
[2018-03-27 13:36:12 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
[2018-03-27 13:36:12 Informational] ========== Discover test finished: 0 found (0:00:00,0035031) ==========
[2018-03-27 13:36:12 Error] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.TestWindow.VsAdapters.UnitTestExtensionDiscoverer.GetAllEnabledExtensions(ILogger log)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.UpdateTestPlatform(Lazy`1 testPlatform)
   at Microsoft.VisualStudio.TestWindow.Controller.TestPlatformProvider.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.GetTestPlatformBySettings(ITestExecutorLauncher testExecutorLauncher, String testRunSettings, Boolean isAppContainer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestDiscoveryRequest.<CreateRequests>d__16.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__98.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__97.MoveNext()
--- 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.RequestFactory.<ExecuteRequest>d__10.MoveNext()
--- 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.RequestFactory.<Execute>d__11.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Wait(Int32 timeout)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose(Boolean disposing)
   at Microsoft.VisualStudio.TestWindow.Controller.Request.Dispose()
   at Microsoft.VisualStudio.TestWindow.Controller.RequestFactory.<Execute>d__11.MoveNext()
--- 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.<ExecuteRequestAsync>d__38.MoveNext()
--- 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.DiscoveryOperation.<StartDiscoverTests>d__15.MoveNext()
--- 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.DiscoverSelectedOperation.<ExecuteInternal>d__8.MoveNext()
--- 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种不同的解决方案上对其进行了测试,结果相同。请帮助!

好的,所以我终于找到了解决方案。我要做的就是转到Testee Project属性 ->配置属性 ->一般并将配置类型从.exe..lib-静态库。欢呼!

最新更新