Question

I'm getting a strange error when trying to build my Burn bootstrapper with a dependency to the .NET 4 framework. I have downloaded the source of the WiX setup and included the NetFx.wxs in my project and added the PackageGroupRef in the Chain, but I'm getting the following error:

error LGHT0103: The system cannot find the file 'dotNetFx40_Full_x86_x64.exe'

File Netfx.wxs:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
    <Fragment>
        <WixVariable Id="WixMbaPrereqPackageId"
                     Value="Netfx4Full" />

        <WixVariable Id="WixMbaPrereqLicenseUrl"
                     Value="NetfxLicense.rtf" />

        <util:RegistrySearch Root="HKLM"
                             Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                             Value="Version"
                             Variable="Netfx4FullVersion" />

        <util:RegistrySearch Root="HKLM"
                             Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
                             Value="Version"
                             Variable="Netfx4x64FullVersion"
                             Win64="yes" />

        <PackageGroup Id="Netfx4Full">

            <ExePackage Id="Netfx4Full"
                        Cache="no"
                        Compressed="no"
                        PerMachine="yes"
                        Permanent="yes"
                        Vital="yes"
                        SourceFile="dotNetFx40_Full_x86_x64.exe"
                        DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=164193"
                        DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />

        </PackageGroup>
    </Fragment>
</Wix>

How do I fix this problem?

Was it helpful?

Solution

You need to have the file dotNetFx40_Full_x86_x64.exe present locally while making the msi. WiX will not pack it in the msi and it will get downloaded at install-time only if required.

OTHER TIPS

You can actually build your package without the dotNetFx40_Full_x86_x64.exe file present by using the <RemotePayload> option which is documented in RemotePayload Element.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top