0
votes

I am using Wix 3.0 and developed a managed custom action which dotnet framework version is 2.0.

Now, I faced a problem. This custom action can not be run in dot net 4.0 only machine, say WinXP SP2 + dotNet 4.0.

(For a managed EXE application, I can add app.config to indicate the supportedruntime with 2.0 and 4.0. But for Wix 3.0, I do not know how to solve it.)

I do not want to upgrade Wix 3.0 to 3.5.

Is there solution for this issue?

2
Why not install 2.0/3.5 frameworks? They all happily coexist.3Dave

2 Answers

1
votes

It seems to be a strong dependency of the managed Custom Action you have developed and the .Net Framework 2.0. If I were you I would consider the next:

  • WiX v3.0 doesn’t have anything to do with this problem.
  • .Net Framework 2.0 is a base prerequisite for the installer.
  • .Net Framework 4.0 is not a prerequisite for the installer.

Summary: I suggest to add a Condition in the installer to validate the existence of .Net Framework 2.0. For that purpose you can use the 'NetFxExtension'.

Hope it helps.

0
votes

Is there solution for this issue?

Yes, document that .NET 2.0 is a prerequisite for your installer. You can add a check for the .NET version in your installer, so that it fails with a clear error message if necessary.

Also note that anything older than Windows XP SP3 cannot run .NET 4, and anything newer already comes with .NET 2.0 installed out of the box. Therefore, the situation that you describe (.NET 4.0 installed but not .NET 2.0) can only occur on Windows XP SP3.