After trying out the solutions suggested on THIS PAGE and still didn't get the issue resolved, I found the solution, the fix, the answer!
The primary fix suggested by the people there is:
1. Main Project Properties - Compile Tab - Advanced Compile Options - Target Framework
Pics for step 1:
2. Deployment Project Properties - Prerequisites - Correct Framework checked.
Pics for step 2:
3. Right-click on Deployment project - View - Launch Conditions. In
the Launch Condition tab, right-click the .Net Framework Launch
condition, then show Properties Window. In the Properties Window, make
sure that the Version property is
the correct Framework.
Pics for Step 3:
How I SOLVED it:
If after doing the above steps you still have the error try this:
1. Right Click the Installer Project, on View > Launch Conditions.
2. Click on .Net Framework
3. On the Properties page, Change the Version to Any.
4. Rebuild the solution.
5. Change the Version back to your target framework. In my case it's .NET Framework 4.
That's it. The warning message disappeared after I did this. I don't know why it happens but I fixed it this way.
C#, Visual Studio 2010,