VC++ Native unit test, Could not locate debug symbols

Viewed 1089

I have 3 projects in one solution, a .dll, a console application .exe as the dll client. recently added native unit test according to this walk through.

while building the solution I get

------ Discover test started ------ Could not locate debug symbols for C:\*\Debug\ConsoleExample.exe. To make use of '--list_content' discovery, ensure that debug symbols are available or make use of '' via a .runsettings file. Test Adapter for Google Test: Test discovery starting...

I have not used google or boost libraries. The test.cpp precomiples are

#include "stdafx.h" // which includes headers of dll project (the exported functions)
#include "CppUnitTest.h" 

I should mention that the tests are not failing, but I wonder what these warnings are for?

  • an extra question: is native unit test works best for testing dll functions or are there better libraries at marketplace, as I am new in c/c++ not familiar with the whole environment. hope this one does not get down vote :)
1 Answers

I just experienced this error today, but my tests failed with the error message "Message: Failed to set up the execution context to run the test."

After a bit more digging around, I learned that the cause was due to an uncaught exception thrown by a regex object, which occurred due to an invalid regex string (I forgot to escape the '\' characters). Fixing the regex string solved this problem.

I'm not sure if that is your same error. Whether it is or not though, I would suggest maybe debugging your code some more and see if an uncaught exception is the reason why you get that error when trying to run your tests.

Related