Reputation: 671
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
Upvotes: 2
Views: 32759
Reputation: 1
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
Upvotes: 0
Reputation: 809
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.
Upvotes: -1
Reputation: 12596
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.
Upvotes: 0
Reputation: 2998
The classic way to keep a console app from exiting is to add another input query so the program pauses until enter is hit.
Upvotes: 0
Reputation: 4830
add a break point to the end of the program or wait for a keyboard hit
Upvotes: 0
Reputation: 7365
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)
Upvotes: 3