tags:

views:

46

answers:

2

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?

A: 

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.

Wim Coenen
Windows Server does not necessarily have any specific version of .Net installed.
Gabe
@Gabe: I forgot Windows Server 2003, which indeed doesn't come with .NET 2.0 preinstalled and is the oldest server version supported by .NET 4.0. But newer Windows Server versions always come with .NET 2.0 preinstalled. http://blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os.aspx
Wim Coenen
Although rare, Windows 2008 Server Core installs with no .Net (2008 R2 may remedy that).
Gabe
A: 

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.

Mario
Yes, it seems this is the best solution. :(
Jamebo
Has this solved your problem?
Mario