Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using wix, how to install Dot net framework 4.5 for Windows 7/8 and dot net 4.0 from Xp and vista

Tags:

wix

wix3.8

wix3.7

I want to install Dot net framework 4.5 as a prerequisite for my application wherever it is possible.As minimum OS requirement for dot net framework 4.5 is Windows Vista SP2.I would like to install dot net framework 4.5 on OS on or above Windows Vista SP2 and Dot net framework 4.0 below Windows Vista Sp2 (i.e. Windows Xp machine). I am using below code.

<PropertyRef Id="NETFRAMEWORK40FULL" />
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="This application requires .NET Framework 4.0 Full or .NETFramework 4.5. Please install the .NET Framework then run this installer again.">
  <![CDATA[Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK45]]>
</Condition>

<Chain>
  <PackageGroupRef Id="NetFx40Web" />
  <PackageGroupRef Id="NetFx45Web" />
  <PackageGroupRef Id="SqlServer2008R2" />
</Chain>

But it is giving error as

The Windows Installer XML variable 'WixMbaPrereqPackageId' is declared in morethan one location.
The Windows Installer XML variable 'WixMbaPrereqLicenseUrl' is declared in more than one location.

I think We can not install both DotnetFramework4 and DotnetFramework 4.5 using WixNetFxExtension library. What choices to do i have now to implement it?? Should i have to manually write a PackageGroup to install Dot net Framework 4.5 checking the OS version is compatible to install it.

like image 756
ABHI Avatar asked Jan 16 '14 11:01

ABHI


People also ask

Can I install .NET 4.5 Windows 7?

You can install . NET 4.5 in Windows 7 and Windows Vista, yes!

How to enable. NET 4. 5?

Open the Control Panel, click "Programs" and then click "Turn Windows features on or off" to open the "Windows Features" dialog. 2. Enable ". NET Framework 4.5 Advanced Services > ASP.NET 4.5" (version 4.6 in Windows 10):

How to add. NET Framework 4. 5?

in the Command Prompt window to start Windows PowerShell. and press Enter to install the NET Framework 4.5 Features feature. Additional Information: The following NET Framework 4.5 Features role services can be installed using Windows PowerShell.


1 Answers

Wix has documentation for installing the .Net framework with your applications using Burn.

http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html

like image 150
Justin Loveless Avatar answered Nov 27 '22 07:11

Justin Loveless