To solve the problem in Windows opencv installation: error configuration process, project files may be invalid

1. Problem description:
CMAKE: OpenCV source code:
error configuration process, project files may be invalid
   
2. One of the solutions
One reason: you did not use CMake to select the VS version on your machine.
For example, VS2010 is installed on my machine. When I configure it, I select the solution of VS2015, which will prompt the above problem.

Solution:
When using the Cmake configuration to generate the corresponding VS solution, I have VS2010 installed on my machine. Here I select the VS2010 solution:

Read More: