How do I make JetBrains Rider put tests project in the main solution folder?
I have recently moved from VS to Rider, and I can't figure this out. I am trying to create unit tests for my solution with xUnit, and that creates a new project in the same solution, but it ends up in a different folder:
C:\Users\Admin\RiderProjects\MyApp (main solution/project folder)
C:\Users\Admin\RiderProjects\MyApp.Tests (automatically created tests project)
The issue with this is that Git module does not track MyApp.Tests, because it is outside the solution folder. I do not want to have separate repository/tracking for tests, they are and should be part of the main solution and repository. I can merge the folders, but that causes all kinds of namespace clashes, implying that this is not the intended way.
Am I doing something wrong here? How should I set up Rider so that it puts the tests project in the solution folder by default? The Create Unit Test dialog does not allow to specify this as far as I can tell.
Please sign in to leave a comment.
Hi Justinas!
Generally, if you have a solution opened, you can easily add a new project to it. For this, right-click on the solution's name in Explorer and choose to Add | New project. The new project is created in the same folder as your solution.
If you use any other way, can you please provide some steps on how exactly you create a test’s project? Are your main project and solution located in the same folder?
Thanks!