开发者

unable to start "program.exe" the system cannot find the file specified vs2008

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?

开发者_StackOverflow社区

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


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)


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


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


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜