Visual Studio 2015 does not discover unit tests: C++

828 views Asked by At

I am working on a C++ project and I developed a few test cases. I was able to execute the test cases until suddenly all the test cases disappeared from the test explorer. I mean to say that test methods are not shown in test explorer even though the test project is compiled properly.

I followed the steps given here with no success.

These are the things I have done:

  • I deleted the content of %temp% folder.
  • I changed the default Processor Architecture to X64. (Test>Test Settings>Default Processor Architecture>X64)
  • Restarted the VS2015.
  • Restarted the system.
  • I tried running devenv /safemode (in command prompt), no luck.
  • I tried running devenv /ResetSettings (in command prompt), no luck.

Notes:

  • There is only 1 test project in my solution and it only contains a few tests right now.
  • My project files are located on a network drive since I am not allowed to store on local.
  • I cannot disable the anti-virus software or firewall and I don't have admin rights on my system.
1

There are 1 answers

0
Boris On

Look into your .vcxproj file and make sure it says

<ClCompile Include="[your-file-name].cpp" />

for each of your files.