0

I am building and running my project in Release and I do not want to build with Debug info.

But when I run the project I get the same error as in this question: debugging information cannot be found or does not match visual studio's

Debugging information for 'foo.exe' cannot be found or does not match. Binary was not built with debug information.

How can I tell Visual Studio 2010 to stop trying to find Debug info in Release?

EDIT:

I'm working in C++. It's interesting, I did start noticing this when I linked in a .dll built from another one of my projects. I wonder if it could have to do with this?

Community
  • 1
  • 1
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
  • Stop running it through the IDE as if debugging. Run the exe outside of VS. That's only an informational message. – Roger Rowland Nov 10 '14 at 14:23
  • @RogerRowland I don't get an error, but that's not the desired solution. I don't understand why just in this project it's trying to load Debug info. – Jonathan Mee Nov 10 '14 at 14:26
  • 2
    If you want to run via the IDE, choose "Start without debugging" CTRL+F5 rather than just F5. – Roger Rowland Nov 10 '14 at 14:27
  • On all your projects make sure Debug Information Format is set to None, and in linker settings Generate Debug Info is No – Neil Kirk Nov 10 '14 at 14:28
  • @RogerRowland Is there not a setting for the project to tell the debugger not to attach in Release? – Jonathan Mee Nov 10 '14 at 14:29
  • 1
    Well, if you press F5, you're *asking* it to attach the debugger! The setting is in your fingertips ;-) Just use CTRL+F5 to start *without* attaching the debugger. – Roger Rowland Nov 10 '14 at 14:30
  • @RogerRowland So this is the only project that I get this warning pop up on. I don't understand why. Note that Configuration Properties>Debugging>Attach is set to "No" – Jonathan Mee Nov 10 '14 at 14:35
  • If it's a Release build, and you have *not* created a PDB, and you launch via the debugger, you *will* get that message. Do your other projects have PDBs? Are they different project types? It's different between native and managed code. Is this maybe a .NET project that loads a native DLL? – Roger Rowland Nov 10 '14 at 14:38
  • 1
    Have you disabled the option `Debugging->Warn if no symbols on launch` ? – stijn Nov 10 '14 at 14:46
  • @stijn That also "Fixes" it... I'm just trying to understand why it's a problem _just_ in this project. I don't need to do that for any of my other projects and I'd like to figure out what I've done wrong here. – Jonathan Mee Nov 10 '14 at 14:48
  • Well you should probably add extra information about that project then. Language? Output type? Differences with other projects (compare project files side by side in a text editor or so)? Maybe the other projects do have pdb files? and so on – stijn Nov 10 '14 at 15:14

1 Answers1

0

I suppose you start your program by clicking on the green arrow next to the build configuration window. By doing this, Visual Studio will always try to run your code in the debugger - even if you compiled it in relase mode.

Try starting your progam by pressing Ctrl + F5 - This should start the .exe without any intervention of the debugger.

Devon Cornwall
  • 957
  • 1
  • 7
  • 17