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-studioNet 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 ...