|
33 | 33 | <Directory Id="DOTNETHOME" Name="dotnet" />
|
34 | 34 | </Directory>
|
35 | 35 | </Directory>
|
| 36 | + |
| 37 | + <?if $(var.Platform)=x64?> |
| 38 | + <CustomActionRef Id="Set_DOTNETHOME_NON_NATIVE_ARCHITECTURE" /> |
| 39 | + <?endif?> |
36 | 40 | </Fragment>
|
37 | 41 |
|
38 | 42 | <Fragment>
|
|
49 | 53 | <ComponentGroup Id="CG_ProductInfo">
|
50 | 54 | <ComponentRef Id="C_ProductVersion"/>
|
51 | 55 | <ComponentRef Id="C_ProductInstallDir"/>
|
| 56 | + <?if $(var.Platform)=x64 ?> |
| 57 | + <ComponentRef Id="C_ProductVersion_NonNative"/> |
| 58 | + <ComponentRef Id="C_ProductInstallDir_NonNative"/> |
| 59 | + <?endif?> |
52 | 60 | </ComponentGroup>
|
53 | 61 |
|
54 | 62 | <DirectoryRef Id="DOTNETHOME">
|
|
59 | 67 | <?define ProductVersionKey=SOFTWARE\Microsoft\ASP.NET Core\Targeting Pack\v$(var.MajorVersion).$(var.MinorVersion)\$(var.PackageVersion)?>
|
60 | 68 |
|
61 | 69 | <Component Id="C_ProductVersion">
|
| 70 | + <?if $(var.Platform)=x64 ?> |
| 71 | + <!-- Only install when actually on native architecture --> |
| 72 | + <Condition>NOT NON_NATIVE_ARCHITECTURE</Condition> |
| 73 | + <?endif?> |
62 | 74 | <RegistryKey Key="$(var.ProductVersionKey)" Root="HKLM">
|
63 | 75 | <RegistryValue Name="Version" Type="string" Value="$(var.Version)" />
|
64 | 76 | </RegistryKey>
|
65 | 77 | </Component>
|
66 | 78 |
|
67 | 79 | <Component Id="C_ProductInstallDir">
|
| 80 | + <?if $(var.Platform)=x64 ?> |
| 81 | + <!-- Only install when actually on native architecture --> |
| 82 | + <Condition>NOT NON_NATIVE_ARCHITECTURE</Condition> |
| 83 | + <?endif?> |
68 | 84 | <RegistryKey Key="SOFTWARE\Microsoft\ASP.NET Core\Targeting Pack" Root="HKLM">
|
69 | 85 | <RegistryValue Name="InstallDir" Type="string" Value="[DOTNETHOME]" />
|
70 | 86 | </RegistryKey>
|
71 | 87 | </Component>
|
| 88 | + |
| 89 | + |
| 90 | + <?if $(var.Platform)=x64 ?> |
| 91 | + <!-- Install keys to a different path when not native architecture --> |
| 92 | + <Component Id="C_ProductVersion_NonNative"> |
| 93 | + <Condition>NON_NATIVE_ARCHITECTURE</Condition> |
| 94 | + <RegistryKey Key="$(var.ProductVersionKey)\$(var.Platform)" Root="HKLM"> |
| 95 | + <RegistryValue Name="Version" Type="string" Value="$(var.Version)" /> |
| 96 | + </RegistryKey> |
| 97 | + </Component> |
| 98 | + <Component Id="C_ProductInstallDir_NonNative"> |
| 99 | + <Condition>NON_NATIVE_ARCHITECTURE</Condition> |
| 100 | + <RegistryKey Key="SOFTWARE\Microsoft\ASP.NET Core\Targeting Pack\$(var.Platform)" Root="HKLM"> |
| 101 | + <RegistryValue Name="InstallDir" Type="string" Value="[DOTNETHOME]" /> |
| 102 | + </RegistryKey> |
| 103 | + </Component> |
| 104 | + <?endif?> |
72 | 105 | </DirectoryRef>
|
73 | 106 | </Fragment>
|
74 | 107 | </Wix>
|
0 commit comments