Compilation error - ICE80: The 64BitComponent ... uses 32BitDirectory

Viewed 19113

The following line

<Component Guid='{THE_GUID}' Id='GlobalScopePackages' >

Generates the following error:

Error   4   ICE80: This 64BitComponent GlobalScopePackages uses 32BitDirectory blablabla    c:\development\...\file.wxs

Error is described on this page http://msdn.microsoft.com/en-us/library/aa369034(VS.85).aspx

How do I fix this or suppress the warning? Is it safe to simply supress the warning?

6 Answers

You can also set Win64="no" in the <Component /> tag of the components which are not 64-bit.

But I can confirm you can ignore this.

I wanted to be able to build my installer both for x86 and x64 depending on the build arguments passed in. I was able to do it like this.

See this blog post by Alek Davis for more information.

Simple example, in the .wxs file

<?if $(var.Platform) = x64 ?>
    <?define Win64 = "yes" ?>
    <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
    <?define Win64 = "no" ?>
    <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>

<Fragment>
    <Directory Id="TARGETDIR"
           Name="SourceDir">
        <Directory Id="$(var.PlatformProgramFilesFolder)">
            <Directory Id="INSTALLFOLDER"
               Name="X" />
        </Directory>
    </Directory>
</Fragment>

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
        <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
        <Component Id="ProductComponent"
             Win64="$(var.Win64)">

    <File Source="$(var.X.TargetPath)" />
    <!-- TODO: Insert files, registry keys, and other resources here. -->
        </Component>
    </ComponentGroup>
</Fragment>
Related