2
votes

I need to author an installer for a program that requires .NET Framework 2.0 SP2.

Since I didn't found a bootstrapper for .NET20SP2, I want to install a newer .NET framework assuming that it already includes the required version. I found the bootstrapper in C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A and chose the .NET 3.5 bootstrapper.

When I installed the bootstrapper it included .NET35 but surprisingly not .NET20SP2. You can find in the registry:

[HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727]
    "SP"=dword:00000001

The condition in my WiX 3.5 installer checks this value:

<Condition Message="This application requires .NET Framework 2.0 SP2. Please install the .NET Framework then run this installer again.">
  <![CDATA[Installed OR (NETFRAMEWORK20_SP_LEVEL and NOT NETFRAMEWORK20_SP_LEVEL > "#1")]]>
</Condition>

Of course, this causes the installation to fail. How can I generate a bootstrapper that installs the required Framework version?

1

1 Answers

0
votes

You could download the .NET2 SP2 redistributable and then author your own bootstrapper package for it.

Warning: in my experience, the slightest mistake in your XML will result in the package being silently ignored by the generatebootstrapper task without any indication as to why. I recommend you start from an existing package and gradually modify it until it does what you want.

There are other ways of generating bootstrappers like the Burn engine in wix 3.6, which I hope to use in the future.