|
59 | 59 | <ComponentGroup Id="CG_ProductInfo">
|
60 | 60 | <ComponentRef Id="C_ProductVersion"/>
|
61 | 61 | <ComponentRef Id="C_ProductInstallDir"/>
|
| 62 | + <?if $(var.Platform)=x64 ?> |
| 63 | + <ComponentRef Id="C_ProductVersion_NonNative"/> |
| 64 | + <ComponentRef Id="C_ProductInstallDir_NonNative"/> |
| 65 | + <?endif?> |
62 | 66 | </ComponentGroup>
|
63 | 67 |
|
64 | 68 | <DirectoryRef Id="DOTNETHOME">
|
65 | 69 | <?ifdef ProductVersionKey?>
|
66 | 70 | <?undef ProductVersionKey?>
|
67 | 71 | <?endif?>
|
68 | 72 |
|
69 |
| - <!-- TODO: the following keys will collide between x64 and ARM64. |
70 |
| - They are actually *already* colliding between x86 and x64 since these will be writing to the x86 registry hive. |
71 |
| - Any interest in fixing this? --> |
72 |
| - |
73 | 73 | <?define ProductVersionKey=SOFTWARE\Microsoft\ASP.NET Core\Targeting Pack\v$(var.MajorVersion).$(var.MinorVersion)\$(var.PackageVersion)?>
|
74 | 74 |
|
75 | 75 | <Component Id="C_ProductVersion">
|
| 76 | + <?if $(var.Platform)=x64 ?> |
| 77 | + <!-- Only install when actually on native architecture --> |
| 78 | + <Condition>NOT NON_NATIVE_ARCHITECTURE</Condition> |
| 79 | + <?endif?> |
76 | 80 | <RegistryKey Key="$(var.ProductVersionKey)" Root="HKLM">
|
77 | 81 | <RegistryValue Name="Version" Type="string" Value="$(var.Version)" />
|
78 | 82 | </RegistryKey>
|
79 | 83 | </Component>
|
80 | 84 |
|
81 | 85 | <Component Id="C_ProductInstallDir">
|
| 86 | + <?if $(var.Platform)=x64 ?> |
| 87 | + <!-- Only install when actually on native architecture --> |
| 88 | + <Condition>NOT NON_NATIVE_ARCHITECTURE</Condition> |
| 89 | + <?endif?> |
82 | 90 | <RegistryKey Key="SOFTWARE\Microsoft\ASP.NET Core\Targeting Pack" Root="HKLM">
|
83 | 91 | <RegistryValue Name="InstallDir" Type="string" Value="[DOTNETHOME]" />
|
84 | 92 | </RegistryKey>
|
85 | 93 | </Component>
|
| 94 | + |
| 95 | + |
| 96 | + <?if $(var.Platform)=x64 ?> |
| 97 | + <!-- Install keys to a different path when not native architecture --> |
| 98 | + <Component Id="C_ProductVersion_NonNative"> |
| 99 | + <Condition>NON_NATIVE_ARCHITECTURE</Condition> |
| 100 | + <RegistryKey Key="$(var.ProductVersionKey)\$(var.Platform)" Root="HKLM"> |
| 101 | + <RegistryValue Name="Version" Type="string" Value="$(var.Version)" /> |
| 102 | + </RegistryKey> |
| 103 | + </Component> |
| 104 | + <Component Id="C_ProductInstallDir_NonNative"> |
| 105 | + <Condition>NON_NATIVE_ARCHITECTURE</Condition> |
| 106 | + <RegistryKey Key="SOFTWARE\Microsoft\ASP.NET Core\Targeting Pack\$(var.Platform)" Root="HKLM"> |
| 107 | + <RegistryValue Name="InstallDir" Type="string" Value="[DOTNETHOME]" /> |
| 108 | + </RegistryKey> |
| 109 | + </Component> |
| 110 | + <?endif?> |
86 | 111 | </DirectoryRef>
|
87 | 112 | </Fragment>
|
88 | 113 | </Wix>
|
0 commit comments