I have a simple setup project made in VS2010. One executable, a few dlls, very plain.
I move my setup.exe and .msi to a clean test machine, and after starting setup.exe, I get a EULA for .NET 4, then ".Net Framework 4 Client Profile (x86 and x64)" is downloaded and (supposedly) installed. The setup asks for a reboot, I reboot, then finally my application can be installed. I start it, and then I get this window:
Clicking yes takes me to this page.
Installing .NET Framework 4.0 seals the deal, no reboot required this time.
All built DLL's and the EXE have .NET 4 as the target framework in project properties (no Client Profile), except one DLL which has .NET 3.5
Why the double installation? How do I make it install once in the wizard?
There's a warning on the setup creation (silly me, didn't see that!):
The target version of the .NET Framework in the project does not match the .NET Framework launch condition version '.NET Framework 4 Client Profile'. Update the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#).
This place has the answer:
1) select installer project
2) click on the icon on top "Launch Conditions Editor" its the icon with a binoculars.
3) Under Launch Conditions, Select ".Net framework" on the right in "Properties" Select "Version" you will see a drop down. change the framework to your target framework.
By default, it seems, a setup project is made with .NET Framework 4 Client Profile, and it has to be changed to "no profile" in two places. The one mentioned above and in the setup project's properties.
I expect some of your projects are set to use the .NET 4 client profile, and some are set to use the .NET 4 profile. Check each project, set them all to .NET 4, and rebuild the solution.