Problems with .NET unit testing


JetBrains Rider automatically detects unit tests and provides a unit test runner to run and debug them. We are continuously improving unit testing with JetBrains Rider, but there are still some areas which are not supported.

So what is currently supported and what is not? 

  Supported since 2017.2
Unit testing Frameworks



Classic MSTest (Windows-only)

MSTest v2 (.NET Core projects - cross-platform, .NET Framework projects - Windows-only)


.NET Framework

.NET Core

Mono (4.8+ recommended)

If you experience any issues with a supported unit testing framework on a supported runtime, please create a request and describe the problem in details, as it will help to sort it out timely. The following information is essential to determine the cause of the issue:


  1. OS version, for example, Windows 10 or Mac OS X 10.8
  2. JetBrains Rider version: Help -> About
  3. Unit testing framework version, for example, xUnit 2.2.0
  4. MSBuild version: Settings -> Build, Execution, Deployment -> Toolset and Build (find screenshot below)
  5. .NET Core version in case you have .NET Core project:
    • Check a path to dotnet executable via Settings -> Build, Execution, Deployment -> Toolset and Build (find screenshot below)
    • Go to the directory with dotnet executable via terminal
    • Run "dotnet --version" command

Log Files

  1. Build your solution and then collect Rider logs: Help -> Collect Logs
  2. Run Unit Tests if you can see them in unit test explorer 
    • Get launch log files: Launch settings -> Show Last Launch Log (find screenshot below) or click on gear icon -> Diagnostics -> Show Last Launch Log
    • Get unit test process log files as described here
  3. Attach the logs to the request



Additional information

  1. Sample solution where the issue reproduces is very much appreciated
  2. Can you see your unit tests in unit test explorer?
  3. Are there any steps to reproduce the issue?
  4. Has it worked in the previous version of JetBrains Rider?

 Thank you for helping us make JetBrains Rider better!

4 out of 16 found this helpful

Same problem as the above two individuals. Trying to run XUnit against .NET Core 3.1 / .NET Standard 2.1 projects. Tests have only recently started failing (possibly since the latest Rider update).

Running Rider 2020.2 on Mac OS 10.15.6.




Devis Nikola Stephen Kennedy,


This seems like a known issue. Please, try running tests against x64 platform explicitly via "Session Options" - I'm attaching a couple of screenshots as a reference.


Just a "me too" from me, I'm afraid, same thing started yesterday. I've found "Invalidate Caches / Restart..." makes it work again for a few runs.


For the BadImageFormatException, changing this setting to x64 seems to have fixed the problem.  


Getting an exit code 139 whenever a unit test runs a struct's public override string ToString() method.

I'm on MacOS 11.0.1 even though the version below shows 10.16 =\

JetBrains Rider 2020.3
Build #RD-203.5981.141, built on December 11, 2020
Licensed to Second Dinner / Mike Schweitzer
Subscription is active until January 8, 2021
Runtime version: x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
.NET Core 3.1.8
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 1450M
Cores: 16
Registry:, ide.tree.horizontal.default.autoscrolling=false,,, ide.tooltip.showAllSeverities=true,,, undo.documentUndoLimit=10000,,,, search.everywhere.settings=true,,,, undo.globalUndoLimit=1000,,, search.everywhere.pattern.checking=false, ide.tooltip.initialDelay=0, ide.require.transaction.for.model.changes=false,,, rdclient.asyncActions=false
Non-Bundled Plugins: com.jetbrains.rider.fsharp, PythonCore, aws.toolkit


same like Nikola and Davis.

I have installed Rider 2020.3 and developing a dotnet 3.1 console application.

And change platform Architecture to "x64" doesn't help at all.
I do run "Cover Selected Unit Test" and get :

08:44:45.976 |I| Process C:\Users\f01bergm\AppData\Local\JetBrains\Toolbox\apps\Rider\ch-0\203.5981.141\lib\ReSharperHost\TestRunner\netcoreapp2.0\ReSharperTestRunner64.exe:3000 has exited
08:44:46.022 |V| Process was not started by this object, so requested information cannot be determined.

--- EXCEPTION #1/2 [InvalidOperationException]
Message = “Process was not started by this object, so requested information cannot be determined.”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
Edited by Frank01 Bergmann

Frank01 Bergmann, it seems to be the same issue as this one:
Please reproduce it in a newer Rider version 2021.1, collect logs and attach to this issue. Also, having a sample solution/example would be very much appreciated.




Hi, I'm running Rider 2021.2.1 and am unable to see any variable values while running NUnit tests. All I get on the variables is" The name 'variable' does not exist in the current context" as shown below.  


Hi Iestyn Jones,

Could you please enable `Debugger` tracing in `Help | Diagnostic Tools | Choose Trace Scenario`, then reproduce the issue once again, collect logs via `Help | Collect Logs`, disable tracing, and share the full log bundle via submitting a new support request (


Adding Microsoft.NET.Test.Sdk solved the problem for me.

I was trying to use XUnit and FluentAssertions but the Microsoft package seems to be needed for Rider to recognize tests in your solution.


Please sign in to leave a comment.

Have more questions?

Submit a request