2

I am able to successfully build solution. but i keep getting this when i try to start debugging or executing it. any suggestions why this might be the case?

update: i fixed the issue. I just recreated the proj with empty files and then just rebuild and it worked. one question: when i start the program (its a console app) how do i stop it from disappearing when i try to enter any input from within vs2008?

thanks

Dave Powell
  • 671
  • 5
  • 14
  • 26

6 Answers6

3

Make sure the debug command

(Properties > Configuration Properties > Debugging > Command)

is pointing to the output file built by your selected configuration.

(Properties > Configuration Properties > General > Output Directory),

(Properties > Configuration Properties > Linker > General > Output File)

Community
  • 1
  • 1
Adam Holmberg
  • 7,245
  • 3
  • 30
  • 53
  • looks like even though the build was a success the binary was not created. can that happen that a program compiles and links yet fails to produce a bin exe? – Dave Powell Feb 15 '10 at 20:02
  • What type of project are you building? (Properties > Configuration Properties > General > Configuration Type) – Adam Holmberg Feb 15 '10 at 20:06
0

I just had this problem, maybe it'll help some one as frustrated as I was. I was just hitting f5, which debugs the program. I went to Debug -> Build Solution, or f7 and it built it and now I can press f5. Super tiny little thing. It normally works if I just press f5, but I'll hit f7 first now.

SirRupertIII
  • 12,324
  • 20
  • 72
  • 121
0

add a break point to the end of the program or wait for a keyboard hit

yan bellavance
  • 4,710
  • 20
  • 62
  • 93
0

The classic way to keep a console app from exiting is to add another input query so the program pauses until enter is hit.

Ben Mathews
  • 2,939
  • 2
  • 19
  • 25
0

To who ever still facing this in visual studio 2022 ,

ctrl+n or just adding a new cpp file wont do

go to SOLUTION EXPLORER >> SOURCE FILES >> RIGHT CLICK (DROP DOWN NEW FILE)>> ADD CPP FILE

-1

Go to the debug folder to see what .exe file build. after that rename your solution name to your .exe file name to solve your problem.

maxshuty
  • 9,708
  • 13
  • 64
  • 77
Prof. Hell
  • 729
  • 12
  • 19