Unit tests not working for Rider 2022.3-EAP8 with .Net7 Sdk
Completed
The latest Rider 2022.3 EAP is supposed to support .NET 7 SDK
(Tried JetBrains Rider 2022.2, same problem)
This bug is the same one as this error logged for RIDER-72248, except this time the proposed workaround does not work, which is to add environment variable:
DOTNET_ROOT(x86)=C:\Program Files (x86)\dotnet\
----------------------------------------------------------------------------------
Getting the following error:
Process C:\Program Files\JetBrains\JetBrains Rider 223.7571.24\lib\ReSharperHost\TestRunner\netcoreapp3.0\ReSharperTestRunner64.exe:12464 exited with code '-2147450750':
Failed to load the dll from [C:\Program Files (x86)\dotnet\host\fxr\7.0.0\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\Program Files (x86)\dotnet\host\fxr\7.0.0\hostfxr.dll failed
- Installing .NET prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?linkid=798306
Looks like it's trying to use the old .Net TestRunner
----------------------------------------------------------------------------------
Details:
--- EXCEPTION #1/3 [UnknownExitCodeException]
Message = “
Process C:\Program Files\JetBrains\JetBrains Rider 223.7571.24\lib\ReSharperHost\TestRunner\netcoreapp3.0\ReSharperTestRunner64.exe:12464 exited with code '-2147450750':
Failed to load the dll from [C:\Program Files (x86)\dotnet\host\fxr\7.0.0\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\Program Files (x86)\dotnet\host\fxr\7.0.0\hostfxr.dll failed
- Installing .NET prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?linkid=798306
”
ExceptionPath = Root.InnerException.InnerException
ClassName = JetBrains.ReSharper.UnitTestFramework.Common.Exceptions.UnknownExitCodeException
HResult = COR_E_EXCEPTION=80131500
--- Outer ---
--- EXCEPTION #2/3 [ProcessExitedUnexpectedlyException]
Message = “Test runner agent exited unexpectedly”
ExceptionPath = Root.InnerException
ClassName = JetBrains.ReSharper.UnitTestFramework.Common.Exceptions.ProcessExitedUnexpectedlyException
InnerException = “Exception #1 at Root.InnerException.InnerException”
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.ReSharper.UnitTestFramework
StackTraceString = “
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.TestRunnerAgent.AnalyseExitCode(IPreparedProcess process)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.TemporaryTestRunnerAgentInvoker.<>c__DisplayClass3_1.<StartTestRunnerAgent>b__3()
at JetBrains.ReSharper.UnitTestFramework.Common.Extensions.TaskExtensions.ThrowIf[TResult,TException](Task`1 task, WaitHandle waitHandle, Func`1 exceptionFactory)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.TemporaryTestRunnerAgentInvoker.StartTestRunnerAgent(ITestRunnerContext ctx, CancellationToken ct)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerAgentManager.GetExecutionAgent(ITestRunnerExecutionContext context, CancellationToken ct)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.StartTestRunner(IUnitTestRun run, ITestRunnerAdditionalStartupOptions environmentSpecifier, CancellationToken cancelCt, CancellationToken abortCt)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.Run(IUnitTestRun run)
at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.StartCore(CancellationToken onCancel, CancellationToken onAbort)
at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.<>c.<StartCore>b__37_0(ExceptionDispatchInfo e)
at JetBrains.Util.Special.GeneralUtil.WithNotNull[T](T item, Action`1 F)
at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.StartCore(CancellationToken onCancel, CancellationToken onAbort)
at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.Start(CancellationToken onCancel, CancellationToken onAbort)
”
--- Outer ---
--- EXCEPTION #3/3 [LoggerException]
Message = “Test runner agent exited unexpectedly”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #2 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Util.ILoggerEx.LogException(ILogger this, LoggingLevel level, Exception exception, ExceptionOrigin exceptionOrigin, String comment)
at JetBrains.Util.ILoggerEx.Error(ILogger this, Exception exception, ExceptionOrigin origin, String comment)
at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.Start(CancellationToken onCancel, CancellationToken onAbort)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField)
at JetBrains.ReSharper.UnitTestFramework.Execution.Launch.UnitTestRun.StartCore(CancellationToken onCancel, CancellationToken onAbort)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.Run(IUnitTestRun run)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerRunStrategy.StartTestRunner(IUnitTestRun run, ITestRunnerAdditionalStartupOptions environmentSpecifier, CancellationToken cancelCt, CancellationToken abortCt)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.TestRunnerAgentManager.GetExecutionAgent(ITestRunnerExecutionContext context, CancellationToken ct)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField)
at JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation.TemporaryTestRunnerAgentInvoker.StartTestRunnerAgent(ITestRunnerContext ctx, CancellationToken ct)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute)
at System.Threading.Tasks.Task.TrySetException(Object exceptionObject)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField)
at JetBrains.ReSharper.UnitTestFramework.Common.Extensions.TaskExtensions.ThrowIf[TResult,TException](Task`1 task, WaitHandle waitHandle, Func`1 exceptionFactory)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Threading.Tasks.Task.TwoTaskWhenAnyPromise`1.Invoke(Task completingTask)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Threading.Tasks.TaskCompletionSource`1.TrySetResult(TResult result)
at JetBrains.ReSharper.UnitTestFramework.Common.Extensions.TaskExtensions.<>c__14`2.<ThrowIf>b__14_0(Object s, Boolean timedOut)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.PortableThreadPool.CompleteWait(RegisteredWaitHandle handle, Boolean timedOut)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
”
Please sign in to leave a comment.
Ok it looks like my problem is resolved, needed to use .Net Sdk 7 (x64)