I'm trying to create a bundle for installing .NET Framework 4.0 if it needs to be installed. I realize there are similar questions, but all of the answers are just snippets and don't describe what file they go in, and how they're imported in to the .wxs file.
This is what I have in a Bundle.wxs file. I get compiler warnings about multiple entry sections.
Error 2 Multiple entry sections '{CF06625F-7B6B-4B6E-A24E-FDDCA7CFFFF4}' and '{0D1EE60A-FC4F-4083-8B1E-311E75A67B4C}' found. Only one entry section may be present in a single target.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle UpgradeCode="{C6FF478E-C3DA-4D78-929D-24C3F3307356}" Version="4.0">
<Chain>
<PackageGroupRef Id="NetFx40Redist"/>
</Chain>
</Bundle>
</Wix>
Most of the links on the WiX page are broken, and do not mention anything about attributes to use on the Bundle tag, and seem to interchange the Package/Product. I could not find mention on the Wix pages about setting a GUID for Bundles. Is that something new to Wix 3.7?
http://wix.sourceforge.net/manual-wix3/install_dotnet.htm
A bundle is a collection of installation packages that are chained together in a single user experience. Bundles are often used to install prerequisites, such as the . NET Framework or Visual C++ runtime, before an application's .
Download. You can download the WiX toolset for free.
NET 6 runtime is installed. WiX provides pre-defined properties to check this for . NET framework but nothing for .
Introduction. Wix# is an open Source framework available on GitHub and used for generating Installer using C# syntax. Wix# is an open source framework for building installer setup for MSI source code by using script file that is written into C#. Wix# uses C# to produce a wix or MSI source code.
That error indicates that your project is building with files that contain more than one of these elements: Product
, Module
, Patch
, PatchCreation
, Bundle
. In your case, it sounds like you added a file with a Bundle
element to a project that already had a Product
element. That isn't supported in the WiX toolset today. You need to put the Bundle
element in a separate project.
Thus, when creating a bootstrapper and MSI, you'll have two .wixproj files. The first .wixproj will contain your Product
information. The second .wixproj will contain your Bundle
information and have a project reference to the first .wixproj so that the build order is correct.
The Wix/Bundle
element is the root of a Bootstrapper project. It doesn't go in the same project as your Product.wxs. In Visual Studio, there is a template for new Wix Bootstrapper projects. You probably haven't created one.
Then in your bundle's Chain, you'll want .NET and your application's MSI, as in the example. To use the NetFx40Web, you have to reference WixNetfxExtension. Wix projects that reference other Wix projects have predefined variables so you can use their properties such as TargetPath. The example assumes this Bootstrapper project references a Setup project called MyApplicationSetup.
<Chain>
<PackageGroupRef Id="NetFx40Web"/>
<MsiPackage Id="MyApplication" SourceFile="$(var.MyApplicationSetup.TargetPath)"/>
</Chain>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With