When I\'m trying to build my VC++ code using 2010 I\'m getting the error message
> C:\\Program Files\\MSBuild\\Microsoft.Cpp\\v4.0\\Microsoft.CppCommon.targ
Actually Just delete the build ( clean it ) , then restart the compiler , build it again problem solved .
I had the same problem today, while I was upgrading some VC6 project to VC2012.
In my case, it was because some of the operation in Custom Built Steps failed. In project properties, go to Custom Build Step, you can see there maybe some something in command line edit box. Open a windows prompt and paste the command to it. Run, check if there is something wrong and fix it.
If there is no command line in the project property Custom Built Step, maybe you should check properties of every single file of the project.
If the command line has some macro, replace it with an actual value.
Or you can echo the command in VS output window:
cd %(somedir)%
echo %(somedir)%
You won't miss it this way.
Navigate from Error List Tab
to the Visual Studios Output
folder by one of the following:
Output
in standard VS view at the bottomView > Output
or Ctrl+Alt+O
where Show output from <build>
should be selected.
You can find out more by analyzing the output logs.
In my case it was an error in the Cmake step, see below. It could be in any build step, as described in the other answers.
> -- Build Type is debug
> CMake Error in CMakeLists.txt:
> A logical block opening on the line
> <path_to_file:line_number>
> is not closed.
For the sake of future readers. My problem was that I was specifying an incompatible openssl library to build my program through CMAKE. Projects were generated but build started failing with this error without any other useful information or error. Verbose cmake/compilation logs didn't help either.
My take away lesson is that cross check the incompatibilities in case your program has dependencies on the any other third party library.