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

7

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?

Monitor answered 18/12, 2009 at 15:58 Comment(0)
R
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.

Raker answered 10/1, 2011 at 1:23 Comment(1)
It's really strange -- in VS2010 ICE80 and such showed up as warnings -- now they show up as errors?Chervil
P
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

Pericarp answered 23/4, 2013 at 23:37 Comment(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.Chervil
This worked, though I had to upgrade my massive project to 64 bit to solve this issue.Luannaluanne
R
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.

Raker answered 10/1, 2011 at 1:23 Comment(1)
It's really strange -- in VS2010 ICE80 and such showed up as warnings -- now they show up as errors?Chervil
M
4

Safe to just suppress the warning.

Monitor answered 18/12, 2009 at 15:58 Comment(0)
P
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>
Pyramidal answered 2/5, 2019 at 8:23 Comment(0)
H
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.

Heterogenesis answered 24/11, 2014 at 9:49 Comment(0)
H
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.

Hynda answered 27/7, 2016 at 0:3 Comment(0)
E
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>
Eleanoraeleanore answered 11/4, 2024 at 9:4 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.