31

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?

7 Answers 7

70

I want a 64-bit installer (as per my Release configuration), so I used <Directory Id="ProgramFiles64Folder"> instead of ProgramFilesFolder as part of the target installation path.

This article provides more information: How to: Create the Windows Installer Package for 64-bit Client Computers

2
  • Well, that won't work for 32-bit machines though. (It's the intended way to do it, but it imposes the unreasonable limitation that you must now build two separate installers, one for 32-bit and one for 64-bit -- even if your assemblies are all compiled as "Any CPU".) -- You can build a single WiX based installer that installs the files to the correct folder (using a dynamic Win64 attribute, etc.) for both 32-bit and 64-bit systems, but it will require you to suppress the ICE80 warning. Commented Sep 1, 2014 at 22:58
  • This worked, though I had to upgrade my massive project to 64 bit to solve this issue.
    – Markus
    Commented Mar 26 at 13:57
19

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.

1
  • 1
    It's really strange -- in VS2010 ICE80 and such showed up as warnings -- now they show up as errors? Commented Sep 1, 2014 at 22:59
4

Safe to just suppress the warning.

4

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>
2

I was getting this error today and found that the Installer project was set to build as x64. All the other projects were Any CPU. I only wanted an x86 installer so simply changing the Platform to x86 fixed this problem for me.

Obviously if you want an x64 based installer then one of the answers above will solve your problem.

2

If anyone trying to automate 'component' creating process using HEAT, there is no switch available (until V3.10) to include Win64=yes/no.

Use -arch x64 switch with Candle will resolve this issue.

0

I think the best and simplest way if you programming your setup for 32bit or 64bit is to check $(var.Platform):

<Fragment>
    <?if $(var.Platform) = x64?>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFiles64Folder">
            <Directory Id="INSTALLFOLDER" Name="ProjName" />
        </Directory>
    </Directory>
    <?else?>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="ProjName" />
        </Directory>
    </Directory>
    <?endif?>
</Fragment>

Simplify:

<Fragment>
    <?if $(var.Platform) = x64?>
    <?define ProgramFiles = "ProgramFiles64Folder" ?>
    <?else?>
    <?define ProgramFiles = "ProgramFilesFolder" ?>
    <?endif?>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="$(var.ProgramFilesDir)">
            <Directory Id="INSTALLFOLDER" Name="ProjName" />
        </Directory>
    </Directory>
</Fragment>

Not the answer you're looking for? Browse other questions tagged or ask your own question.