install .net

Jan 25 at 10:25 AM
im trying install .net in my installer

my code base on one of the threads here
string msiproject = buildmsi();

        var bootstrapper = new Bundle(productname,
                                new PackageGroupRef("NetFx461Web"),
                                new MsiPackage(msiproject) { DisplayInternalUI = true });
        bootstrapper.Version = new Version("1.0.0.0");
        bootstrapper.UpgradeCode = new Guid("929339fd-c7c1-43eb-9fad-a24a23b99802");
        bootstrapper.Application = new SilentBootstrapperApplication();
        bootstrapper.Build();
im getting an errors:

The Windows Installer XML variable 'WixMbaPrereqPackageId' is declared in more than one location. Please remove one of the declarations.

The Windows Installer XML variable 'WixMbaPrereqLicenseUrl' is declared in more than one location. Please remove one of the declarations.


also im new in wix so im not sure if this just build .net install file or automaticly install it
thanks
Jan 26 at 2:29 AM
Edited Jan 26 at 2:33 AM
Have a look at Bundle.SuppressWixMbaPrereqVars. It should solve your problem.

Can you also confirm that the build output contains the Wix# generated warning indicating the solution to the problem?
======================================================
WARNING: It looks like one of the packages defines WixMbaPrereqPackageId/WixMbaPrereqLicenseUrl in addition to the definition auto-inserted by Wix# managed BA. If it is the case set your Bundle project SuppressWixMbaPrereqVars to true to fix the problem.
======================================================
Please use GitHub for further discussions as this website is no longer active.
Marked as answer by roey_rdt on 1/25/2017 at 11:18 PM
Jan 26 at 7:18 AM
Yes i see the warning.
The problem solved.
Thank you.