I solved this by doing the following:
- In a command prompt, type msconfig and press enter.
- Click services tab.
- Look for "Application Experience" and put tick mark (that is, select this to enable).
- Click OK. And restart if necessary.
Thus the problem will go forever. Do build randomly and debug your C++ projects without any disturbance.