No build menu in Visual Studio when opening an existing cpp file
23,525
You need to open more than the .cpp
file alone.
Make sure you open the whole project or solution (File/Open/Project
- .sln
, .vcxproj
, .vcproj
). Double clicking on a .cpp
file will open that file only.
Then you should be able to build the project (or hit Ctrl-F5).
Author by
Admin
Updated on January 19, 2020Comments
-
Admin over 4 years
I am new to Visual Studio. I just followed a tutorial and successfully wrote and ran a simple program. But after I closed Visual Studio and double click the cpp file I just wrote. I can't find the build menu in the Visual Studio. Could anyone tell me how to open and run the existing cpp file? I need to do some debug and don't want to begin a new project and copy the code again and again. Thanks!
-
rlam12 over 8 yearsTo be more precise, open the file that ends in .sln or in .vcxproj, they are the project file that instruct VS how to build your program and what files it needs
-
Danny_ds over 8 years@rlam12 - Exactly - added the file extentions. Thanks.
-
Admin over 8 yearsThank all of you above. It worked. Sorry for late adopt.