Currently I am working on a project that needs .NET 4.0 to work properly but when I configure the windows installer and try to install it is trying to install the latest ver
When you create a setup project and add primary output of a project to the setup project, the setup project automatically detect dependencies including Microsoft .Net Framework. To see if the detected dependency is correctly what you need, you cam see the following locations:
First of all, right click on Dependencies and click on Refresh Dependencies.
Check prerequisites for your project:
Check Launch Conditions for your setup project: