Author Topic: XUnit in VS2019 failing  (Read 1667 times)

0 Members and 1 Guest are viewing this topic.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
XUnit in VS2019 failing
« on: May 04, 2019, 03:50:16 AM »
I.m wondering if anyone has seen this previously ..
I have a Test project that works in vs2017
and fails in vs2019 with the following message < part >

[2019-05-04 19:37: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.Controller.TestRunRequest.StartParentTestRunRequest(TestRunCriteria criteriaBasedOn, Boolean skipDefaultAdapters, Boolean areAllTestContainersCSharpOrVBProjects)
   at Microsoft.VisualStudio.TestWindow.Controller.TestRunRequest.<CreateRequests>d__23.MoveNext()
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<RunRequests>d__95.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestWindow.Controller.Request.<ProcessRequest>d__94.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 ---

<continues>


Project based on https://xunit.net/docs/getting-started/netfx/visual-studio
Net Framework version changed backwards to 4.5.2 Change this BEFORE installing the NuGet packages.
Only "xunit" and "xunit.runner.visualstudio" need to be loaded from NuGet.
Solution cleaned and rebuilt.

Some piccys from the VS2017 build and the Solution ZIP ...
« Last Edit: May 04, 2019, 03:56:24 AM by kdub »
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.