Cannot compile source file with Ctrl-F7 in VS 2008

  • Thread starter Thread starter OffByOne
  • Start date Start date
O

OffByOne

Guest
I have added an existing .cpp file to my project. When I want to compile only one file, I usually press Ctrl-F7, but that does not work on this file (it works on some other source files). When I pull down the Build menu, the Compile option is missing, like it is when a header (*.h) file is active.

When I right-click on the source file in the Solution Explorer, the context menu shows "Compile\tCtrl+F7"; I can compile a single source file that way, but Ctrl-F7 is so much easier and faster.

I have tried resetting the keyboard shortcut, resetting the profile to the original C/C++ profile, and closing and reopening Visual Studio, but nothing corrected the issue.

It feels like VS is not recognizing that my source file is a C++ file, despite its name (something.cpp). Why has this started happening, and how can I get the shortcut (and Build menu) to reset?

Continue reading...
 
Back
Top