Take the 2-minute tour ×

I have a VS2008 solution containing two C++ projects. One is a Win32/console .dll and the other is a tester program to test that dll, also a Win32 console app.

When I build the solution, even with a clean build and with the Debug Command set to the hardcoded path to the executable, trying to debug presents a messagebox saying,

"the specified file is an unrecognized or unsupported binary format".

The program it is trying to execute is the source of tester.cpp.

Can someone suggest a cure? What information may I provide to help solve this problem?

share|improve this question

3 Answers 3

up vote 16 down vote accepted

Please make sure that your test application (it should be an executable: .exe) is the one you're running and not the DLL. Set it as the "startup project" for example.

You can do so from within your Solution Explorer by right-clicking the appropriate project and selecting "Set as startup project".

share|improve this answer
set single or multiple? –  Ivan Wang Jun 14 '12 at 5:32
@IvanWang What do you mean exactly? –  Bart Jun 14 '12 at 8:31
LOL I was saying should we set it as the startup project multiple or single, as in there were two options to choose. But it all works fine now. –  Ivan Wang Jun 15 '12 at 16:54

I have a VS2010 solution containing two C++ projects: one project generates a .lib file and the another project (which contains"main.cpp") is used to test the functionality provided by the .lib file.

for that, I go to the solution explorer, right click '2nd Project' and go to References. when you click "Add new reference", it already contains references to the First Project. Select it.

Now, I need to set the '2nd Project' (which contains "main.cpp") as start-up project so that I can debug the code. for that, again, go to the solution explorer, right click '2nd Project' and go to Set as StartUp Project

share|improve this answer

The easiest way to solve this issue, is to delete the .suo file and re-build the project.

First, you have to change your folder options, to show hidden files (as the .suo file is generally hidden). If you are not sure how to do it, refer to http://windows.microsoft.com/en-sg/windows/show-hidden-files#show-hidden-files=windows-7

Secondly, browse to the location where the respective Visual Studio Solution file is saved and delete the .suo file. If you need to know more about the .suo files, please refer to http://msdn.microsoft.com/en-us/library/bb165909.aspx

Finally, re-build your project.

This method, generally has solved most of similar issues which occurred to me.

Hope this helps!

share|improve this answer

Your Answer


