3

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:

enter image description here

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?

MPelletier
  • 16,256
  • 15
  • 86
  • 137

2 Answers2

4

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.


UPDATE

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.

  1. Select installer project
  2. Go to properties (right click -> Properties)
  3. Go into Prerequisites...
  4. Uncheck "Microsoft .NET Framework 4 Client Profile (x86 and x64)" and check "Microsoft .NET Framework 4 (x86 and x64)"
MPelletier
  • 16,256
  • 15
  • 86
  • 137
0

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.

Jeremy Holovacs
  • 22,480
  • 33
  • 117
  • 254