Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# Resharper 'No Tests Found in Project' / 'Inconclusive: Test wasn't run'

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:Resharper test icons

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.

like image 339
djs Avatar asked Nov 06 '14 20:11

djs


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

Is C language easy?

C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.

What is C in C language?

What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.


1 Answers

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).

like image 137
Marcel Studer Avatar answered Sep 30 '22 02:09

Marcel Studer