1

I know how to include the .NET Framework 4 as a dependency to my installer Setup Project in Visual Studio 2010. However, is there a configuration to set to make the installer check if the dependency is available, and then install .NET 4 on the machine when it isn't?

At the moment all it does is include the .NET Framework 4 installer in a separate folder in the "Release" output folder.

UPDATE:

  1. I do have the .NET Framework 4 set as a launch condition.
  2. I do have the .NET Framework 4 set as a precondition.
  3. One thing I notice, in the launch conditions window, I cannot delete the current .NET Framework launch condition, and the option "Add .NET Framework Launch Condition" is greyed out.
Community
  • 1
  • 1
Seth
  • 8,213
  • 14
  • 71
  • 103
  • Note that my problem is occurring when installing on windows xp. Not sure of the result on Windows 7. – Seth Nov 10 '11 at 23:25
  • Also note that the main executable I am trying to install is an unsigned assembly. – Seth Nov 10 '11 at 23:28

2 Answers2

1

You need to add an launch condition in addition to making a pre-requisite (as described in your link):

http://msdn.microsoft.com/en-us/library/xxyh2e6a.aspx

Jeff
  • 35,755
  • 15
  • 108
  • 220
  • This hasn't solved the problem. Any other ideas? When I run the installer it is like it doesn't even do that check... – Seth Nov 10 '11 at 06:06
  • Is this an upgraded vdproj that used to be for 3.5? The upgrade process can be a bit buggy – Jeff Nov 11 '11 at 04:09
0

You need a prerequisite instead of a launch condition:

  • in your setup project Launch Conditions Editor remove the .NET Framework launch condition
  • right-click your setup project in Solution Explorer and select Properties
  • click Prerequisites button in the shown property page
  • make sure that the appropriate .NET Framework prerequisite is checked

Optionally, you can create your own custom prerequisite instead of using the predefined one.

Launch conditions stop the install when not met. Prerequisites are packages which are automatically detected and installed before your main installation.

Cosmin
  • 21,216
  • 5
  • 45
  • 60