Unit Tests Stopped Working and Stuck in Pending State VS2012 - unit-testing

I have a somewhat major issue here and I have no idea how to debug the problem. First off I am running VS2012 Update 2 (v11.0.60315.01). Unit Tests had been running and I noticed today that they quit working. I was working on something different past week or so so it's been at least a week or 2 since I last ran any unit tests.
All of the tests are stuck in the Pending state in the Unit Test Session window. I even tried spinning up a new test harness and running some simple unit tests. They behave identically, so I don't think this is a single solution issue.
I have obviously rebooted the machine which included restarting VS.NET 2012 as well. I'm not getting any errors, messages, problems, etc. The unit tests are all just stuck in the Pending state and none of them will run.
I ran the .dll that comprises my tests using the vstest.console.exe tool and I get the result "Test Run Successful", "Test execution time: 0.4952 seconds". OK, this tells me I have a problem with VS2012 because the tests run independently using the command line.
How can I debug this issue? I see solutions for deleting settings files for individual solutions but this seems like an issue across the board with VS2012. Any suggestion on how to fix this?

If you're using Resharper, then there is an issue with version 7.1.2 and below in combination with Visual Studio 2012 Update 2.
Jetbrains has released a new version (7.1.3) which solved the issue, the latest EAP also resolved this issue.
If you're running an older version of Visual Studio 2012 and are experiencing these issues with Resharper 8, then make sure you install Visual Studio Update 2 at the least. If I had to choose, I'd always install the latest version, which would be Visual Studio 2012 Update 4

The 7.1.3 version of Resharper also works following Update 3 for Visual Studio 2012. Not sure about the newest version 8 but that older version is still available for download here.

Related

Visual Studio 2017 (any edition) not longer able to install or update on Windows 10

I have the problem that I cannot update or install Visual Studio anymore on my system.
Today I saw that a newer Visual Studio 2017 version was released and I tried to start the VS installer for the update process. The start for the installer was just spinning but nothing happened. After that I tried to start the installer separately from VS but it didn't work either.
So I continued to make an even bigger mistake by assuming my installed version is bad and to completely reinstall Visual Studio by uninstalling and then trying to start the normal installation process.
Unfortunately it didn't work.
After downloading the webinstaller, it downloads the installer packages it needs but the vs_installer.exe itself will never run successfully afterwards (also if started manually).
There is no error shown directly. It just does not start. The EventViewer is also not showing any errors I would say have a connection to the problem.
Any ideas? Thanks!
After a bit of communication with the Visual Studio team they pointed me to the only thing they know could cause this issue.
Some time ago I added an environment variable to my system named NODE_OPTIONS. It was necessary because the builds of our Angular applications are so big that we had to adjust the available memory size.
Removing the environment variable enabled me to start vs_installer.exe and to reinstall Visual Studio again.
It's a bit obscure and not many people will have this problem. But I hope Microsoft will fix it anyway.
P.S. The silent crash is caused by the usage of Electron for the Visual Studio installer. The person from Microsoft, who helped me to workaround the problem, told me that they are working on a fix.

Visual Studio Test Explorer window not refreshing

Multiple times throughout the day, my Test Explorer window in Visual Studio 2017 is locking up. Whilst it doesn't crash VS, when affected I can't run any tests as none of the options are available when right clicking on a test....
I have a mixture of NUnit and SpecFlow+ tests in different projects. Cleaning and rebuilding the solution doesn't work, the test explorer window doesn't change. Attempting to use the 'NUnit test (click to run)' option also does nothing.
The only way to resolve this issue is to restart Visual Studio which is highly frustrating.
Anyone know what the issue could be?
Thanks
I was also facing the same issue, as a workaround I Unloaded my test project and then Reloaded back; then ran the test again. This time it refreshed the Test explorer :)
My VS version: VS Professional 2019 Version 16.9.6.
Note: I had to do this to all my Test projects.
I have had multiple issues with specflow+. In the end I uninstalled specflow+ and went with normal specflow. This solved many issues for me, including this issue. Hopefully it will work for you as well.

Debugging with Resharper 9 and Visual Studio 2013

I use the newest build of Resharper (9.3) and Resharper C++ with Visual Studio 2013.
Code editing, refactoring, ... works great. But if I try to debug the code, I get a weird error:
an empty window with "Source not available. The current thread is not currently running code or the call stack could not be obtained".
which makes debugging quite difficult.
I think the problem is related to Resharper, because this problem did not occur before I installed Resharper nor does the problem occur if Resharper is disabled.
Is there a solution for this problem or another tool with similar capabilities that can be used instead?
Latest version is 9.2 and the bug should be reported to jetbrains

ReSharper unit tests pending indefinetely

first of all, I've never used unit tests with ReSharper before, so I don't know how to debug it. The problem is that if run MS unit tests by VS test explorer everything works fine, but if I run it through resharper's Unit Test Sessions it just does nothing and stays in a pending state, even with just one test starting with Assert.Fail. I am seeing no load on CPU or anything.
I am using ReSharper 8.0.14.856 with Visual Studio 11.0.50727.1 . Searches bring me many results with older versions, but I guess those should work fine?
As I see you use VS2012 RTM, but according to http://www.jetbrains.com/resharper/download/index.html -> "System requirements", you need to have at least Visual Studio 2012 Update 3 (there were some changes in MSTest API between RTM and Update 3, ReSharper 8 supports the latest ones). So, please install Update 3 to your VS2012 installation and you will be able to run MSTest tests.

Weird problem with Visual Studio - when I change the name of a unit test, it does not update

I've run into a weird problem with Unit Tests in Visual Studio 2010 that I can't solve (is this a bug in Visual Studio?).
If I edit the name of a unit test, it is not updating in the "Test List Editor" view. If I add a unit test using the normal method, it doesn't add it to the list of unit tests.
Any ideas on what might be possibly be causing this, and perhaps brainstorming some method to redo my Unit Test project to fix this problem?
Found the problem: I have ReSharper installed, and it unexpectedly took over the default unit testing framework provided by Visual Studio 2010, when an auto version upgrade took place. I am currently running the unit tests using the ReSharper unit testing plugin, and everything works fine. This is not to say that it's necessarily ReSharper's fault, I did opt in to use the enhanced unit testing framework when I installed it a month ago (and I can opt out by switching it off in options).