Reputation: 1710
I've got ReSharper v8.2.1 installed. I have a VS2013 solution that contains several test projects. Most of them work just fine. However, one project is giving me trouble.
In the Solution Explorer, I right-click the project and select "Run Unit Tests" and get the error "No Tests Found in Project." If I right click on one of the .cs file that contain tests and select "Run Unit Tests," I get the error "No Unit Test Found in File." If I open the file, I see the test icons as expected:
After opening the file and running the test, it finally adds them to the Unit Test Sessions window. But they all come up as "Inconclusive: Test wasn't run." I tried setting breakpoints in the test and also in the TestInitialize
method, but neither are hit.
It is worth mentioning that these test worked just fine until recently. It seemed to start after I cancelled a long-running test in another project. But there are no code or project or solution changes. I deleted my source code and got it fresh from SVN. I even deleted my AppData\Local\JetBrains
folder to make sure something wasn't cached.
How does Resharper determine which tests it should run? Anyone have other suggestions for getting these tests to run again?
Update: I uninstalled ReSharper to eliminate it from the equation. I was still unable to get this subset of unit tests to run.
Then, in Visual Studio, I opened TEST -> Test Settings -> Default Processor Architecture
and changed it from x86
to x64
. My tests would now run! I still haven't isolated why this one project won't run in x86 mode, but I was happy to have all my tests running again!
However, I then re-installed ReSharper, this time v9.0 Update 1, and now this unit test won't run again regardless of how I set the architecture. I went back through all the answers and suggestions of clearing caches, etc, and still no luck.
Upvotes: 26
Views: 11719
Reputation: 1047
This suddenly happened for me on test projects the previously worked fine. The solution for me was to change Target Framework on the test projects from .NET Core 2.0 to .NET Core 3.1.
Upvotes: 0
Reputation: 14426
Searching for things to do with SpecFlow was leading my to lots of red herrings.
The problem for me in the end was that I had not configured resharper to run NUnit tests.
Do this by going into [Resharper] > Options | Tools, Unit Testing, NUnit
Then make sure Enable NUnit support
is selected.
Upvotes: 1
Reputation: 21
Remove the test project from the solution and add it back. It works for me.
Upvotes: 2
Reputation: 2127
Going to Resharper -> Options -> Tools -> Unit Testing -> and remove check from "Shadow-copy assemblies being tested". I've tried all the things you have, nothing helped, this was the only thing that helped me resolve.
Let me know if this helps.
Upvotes: 2
Reputation: 591
Try clearing the ReSharper caches. In Visual Studio, click on Resharper/Options. You can find the "clear caches" button in the "Environment" settings ("General").
Then close/reopen Visual Studio.
This worked for me (R# 9 with VS 2013 Update 4).
Upvotes: 34
Reputation: 101
Try closing visual studio and then right click and run visual studio as an administrator.
Upvotes: 3