1

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?

2 Answers 2

7

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.

Sign up to request clarification or add additional context in comments.

5 Comments

Half of what WiX does seems crazy at times! ;-)
Does this mean I'd have to commit the redistributable file into my version control system for building on a build server? Holy COW!!!
@TimLong You can use the <RemotePayload> option which is documented here, wix.sourceforge.net/manual-wix3/wix_xsd_remotepayload.htm
@ViktorElofsson If you put that in an answer I'll accept it and vote it up
WiX toolset needs to get the hash, size, signature and other information from the executable package when creating the Bundle to correctly install/cache the package. That is why the file must either be present or use the RemotePayload element to provide the data directly. It isn't crazy when you look under the hood.
6

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.