✅ why dotnet test command in rider doesn't run the unit tests
Hello guys, when I try to run the unit test in rider IDE using the command dotnet test, it seems only the project is build but the unit tests aren't executed. Can someone explain why please.

5 Replies
show code
I think I found the issue
Instead of choosing Unit Test Project, I choose unit test in project type; what's the difference ?

The project type sets up essential things to make it the project type. What you are talking about is the template of the project with generally includes more template code to start off with like tests and such.
You can try making a new project with this and see if it works
There's not a whole lot a test project does, but you might be missing an essential package or feature
yeah, when I choose project type instead of the template, there are lot of things that doesn't really work as intended. For example, when I use the
dotnet test
, it just build the project but doesn't execute the test cases. Similarly, if I try to add a reference, it seems that the version of the SDK may differ, like one of my project has SDK 9.0 while the project type has something like v4.8 making it incompatible. But when I use the template, everything works fine, I will just stick with that for now