[wix-devs] Stable Guid MSBuild task

Hoover, Jacob Jacob.Hoover at greenheck.com
Tue Sep 17 08:18:04 PDT 2019


For wix4, would anyone else find use in having the existing stable guid logic also exposed as a MSBuild task? While a random guid works, sometimes having something deterministic is desired.

Ex:
  <Target Name="GenerateUpgradeCode">
                <PropertyGroup>
                                <ProductCodeKey>$(ApplicationBuild)#$(Version)#ProductCode</ProductCodeKey>
                                <UpgradeCodeKey>$(ApplicationBuild)#$(Version)#UpgradeCode</UpgradeCodeKey>
                                <Salt>{C1BA69E1-B69D-46B8-A095-CAF6337B71F4}</Salt>
                </PropertyGroup>

                <GetStableGUID Key="$(ProductCodeKey)" Salt="$(Salt)">
                                <Output TaskParameter="Stable" PropertyName="ProductCode" />
                </GetStableGUID>
                <GetStableGUID Key="$(UpgradeCodeKey)" Salt="$(Salt)">
                                <Output TaskParameter="Stable" PropertyName="UpgradeCode" />
                </GetStableGUID>
                <PropertyGroup>
                                <DefineConstants>
                                  $(DefineConstants);
                                  ProductCode=$(ProductCode);
                                  UpgradeCode=$(UpgradeCode);
                                </DefineConstants>
                </PropertyGroup>
  </Target>


Thanks,
Jacob



More information about the wix-devs mailing list