How do I detect .Net Framework 4.7.2 using wix 3.11 burn - wix

I have been trying out to have .net Framework 4.7.2 as a prerequisite for my installer.
I have done below in the bundle file
= $(var.NetFx46MinRelease)]]>
But with these changes I am unable to detect the Framework.
The installer proceeds for installation even it does not have 4.7.2 or higher.
I want the bootstrapper to detect and not the Msi.
Did anyone face the same issue and resolved it?

Check the below links
https://github.com/wixtoolset/issues/issues/5575
Install .NET Framework 4.7.2 (if needed) with WIX installer

Related

Wix Installer won't build on buildserver

I have tried to build a Wix MSI using our build server. I have set the build configuration in the Configuration manager to DEBUG/x86. All the other projects build correctly EXCEPT for the Wix Installer.
Initially there was an error requesting the latest version of WIX was installed on the build server "The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" so I follwed this -
https://subscription.packtpub.com/book/web_development/9781784393212/1/ch01lvl1sec12/compiling-a-wix-installer-on-a-build-machine-using-msbuild
also have used this -
https://wixtoolset.org/documentation/manual/v3/msbuild/wix_with_team_build.html
Now the build freezes on the Wix project and eventually times oout at 59 minutes. What would be wrong? what needs correctling?
I have tried these suggestions already - https://subscription.packtpub.com/book/web_development/9781784393212/1/ch01lvl1sec12/compiling-a-wix-installer-on-a-build-machine-using-msbuild
also have used this -
https://wixtoolset.org/documentation/manual/v3/msbuild/wix_with_team_build.html
Expecting it to build, then I can create an MSI file.
.NET 3.5: This might very well be something else, but maybe try to install the .NET Framework 3.5. WiX 3.x has a build-dependency requiring this .NET version.
How-To: Please see this answer for more details: WiX Toolset: Creating a simple WiX project breaks in VS2017: The "CreateProjectReferenceDefineConstants" task was not found

How to download and install the .NET Framework using Wix Installer?

We have an Application that depends on an installed .NET Framework 4.5. The Wix setup should automatically detect when an .NET Framework 4.5 (or greater) is not installed. That works fine with the following wix declaration:
<PropertyRef Id="NETFRAMEWORK45"/>
<Condition Message=".NET Framwork 4.5 is not installed.">
<![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
Our Target: The Wix Setup should automatically download and install the .Net Framework 4.5. It seem, that 'burn' provides a mechanism, that let the setup install the .NET Framwork automatically: http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html. The documentation defines references to Setup files of the .NET Framework:
<MsiPackage Id="MyApplication" SourceFile="$(var.MyApplicationSetup.TargetPath)"/>
But we not want to add the .NET Framework into our Setup. The setup should automatically download it on the target system where the setup will be executed.
How can we achieve this?
Please see the NetFx45Web package group ref:
http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html
For more information on how this works if you didn't have the package group ref see a similar example:
Web download of vcruntime140 with wix burn
Microsoft allows you to redistribute their framework but only in its original form.
This also means that you can't build the framework into your own .msi package.
What you can do is to provide a separate bootstrap installer, Setup.exe, that looks for the installed framework and starts your .NET Framework redistributable.
If you have found a way to do this without using a Bootstrap installer, please let me know.

VS2012 and Wix 3.6 - Installing .Net 4.5 with my application

I am very new to the installer world.
I have successfully made an .msi for my application and it is building with short-cuts and also uninstalls correctly.
My next goal is to package .Net 4.5 with the installer and have it be installed prior to the installation of my application.
I also have a third party application that needs to be installed. It is packaged as an msi.
From what I can gather I need to develop a Bootstraper solution to have these applications install in sequence.
Can anyone provide a guide as to how to implement an installer in such a way? My searches have come up with a bunch of partial implementations with an assumption of the design of a Wix Bootstrapper Project in Visual Studio.
I hope this helps someone. It took me 5 hours to figure it out. Maybe, my bad, but did not find anything about it in the docs or blogs.
So my scenario is: VS 2012, WIX 3.6 with Burn bootsrapper, create a Setup executable in order to check .NET Framework 4.5 and install it by downloading if not installed already. Sounds simple. And it is. Actually very.
Create your MSI installer project (WIX Setup Project), to produce an installer for your application.
Create a WIX Bootstrapper Project for your Setup executable.
Follow the instructions here, to create your Boundle.wxs
Add a reference to the WixNetFxExtension.dll which can be found in the WIX program directory.
Include the following line in your Chain:
<PackageGroupRef Id="NetFx45Redist"/>
Actually the WixNetFx extension contains a working install package definition for the .NET Framework 4.5.
As caveman_dick mentioned, Burn in WiX 3.6 supports this but you may also want to take a look at dotNetInstaller (http://dblock.github.com/dotnetinstaller/). We use it to install .NET 4.0 but I'm sure it works for installing 4.5 as well. It can also install other MSI dependencies very easily.

Where can I find the .NET bootstrapper files?

I have created a setup project with VS2008 for a .NET Windows Forms application using .NET Framework 3.5.
But I want to create an installation with WiX 3.5. Since I have VS2008 installed, I expected I can use the instructions in the help section How To: Install the .NET Framework Using a Bootstrapper. Unfortunately this includes a reference to the directory
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\
that I cannot find on my PC although this should be present if VS2008 is installed. Should I find it somewhere on my PC or do I have to install this manually? Why should this be necessary?
What are other opportunities to automatically install the .NET framework when required?
Edit:
The WiX documentation describes the path for VS2005 on a 32 bit operating system. I found the boostrapper at
C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper
There are a few related questions to yours, check out WiX: Where can I download the bootstrapper?

building wix managed Custom Actions in .net 4.0

We just recently upgraded all our code base to .net 4.0, and are trying to build custom actions in our installer using .net 4.0.
We are using wix 3.5 to do that, I am getting BadImageException, saying its built using a newer version of .net runtime than currently loaded.
does wix 3.5's makesxca utility support .net 4.0 ?
Have you tried changing the <supportedRuntime> version in the CustomAction.config to "v4.0"? I didn't try myself, it is just a guess. This article is referenced as the explanation.