Visual Studio Professional 2022 17.4.0 will not discover tests in test explorer

1.5k Views Asked by At

After updating to 17.4.0 I can not discover tests in test explorer. Is anyone else experiencing this? The output I see in test explorer after selecting run all tests is "test discovery finished: 0 tests found". I am running .Net4.7.2, Selenium, Specflow and NUIT.

  • I have searched the web w/o finding much.
  • I tried to update any nuget packages that may effect this with no resolve.
  • I also restarted visual studio and my PC.
  • Built and cleaned the solution several times

At this point I am going to rollback to the previous version of visual studio 2022.

3

There are 3 best solutions below

0
C_Sutt On

I ended up rolling the version back to 17.1.6 and I am now having no problems. The steps to do this are here: https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history

0
Alex Dorha On

I have the same problem I ended up with cleaning Temp folder and update NUnit packages For few days it was ok and it worked After I wanted to work on another project and I made the same things it was not ok anymore I ended up rolling back to the same version 17.1.6 because for newer versions I had a problem with debug when I wanted to debug Selenium tests

0
StevePoling On

I had a similar problem with VS2022 17.5.0. My GoogleTests showed up fine with v17.4.x, but after I updated to 17.5.0 they all disappeared.

I flailed about changing settings with no success to "Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate." UNTIL today I asked Visual Studio Installer to install some additional components (CLI tools and other miscellany). Afterwards I did a batch clean and a rebuild. All my Googletests reappeared as mysteriously as they disappeared.

I'm clueless as to why.

I suspect v17.5.0 changed what it demands of the Google Test adapter and one of those missing components is now satisfying it. If anyone can give an answer better than my speculation, I'll be much obliged.