Wixsharp: docs suggest UpgradeCode is not directly settable

Created on 13 Oct 2019  路  4Comments  路  Source: oleg-shilo/wixsharp

Wix# compiler uses Project.GUID as a seed for deterministic auto-generation of both product Id and UpgradeCode. Thus you can have your deployment for two versions of the product as follows:
at https://github.com/oleg-shilo/wixsharp/wiki/Deployment-scenarios#identities-and-naming suggests the UpgradeCode is auto-generated (seeded) by the Project.GUID where https://github.com/oleg-shilo/wixsharp/blob/5180cf253b7037aca0efb88c0635dabe0d78a838/Source/src/WixSharp/Project.cs#L484 shows UpgradeCode is set directly by Project.GUID, if it hasn't already been directly set. This is probably (yet another) place to assert the UpgradeCode is likely the only GUID you need to specify and keep consistent.

I have an existing pile of wxs for an installer I built manually that I am contemplating porting to Wix#, hence the desire to make sure the UpgradeCode is preserved.

unrelated: This is probably a separate issue but have you got any tips for porting the XML "pile" to Wix#? It's a ripper, lots of merge modules too, just for laughs. More: https://forums.autodesk.com/t5/net/realdwg-installer-why-so-cryptic/td-p/6341741
Also there's the python one I modded at https://github.com/CADbloke/apps.exchange.packager which is becoming increasingly unmaintainable and non-generic, I want to rewrite it to use a config to generate installers for all sorts of AutoCAD / BricsCAD plugins.

So yeah, I do regret not starting with Wix#, for the record. :/

question

All 4 comments

If one are facing a porting mammoth job as you do setting UpgradeCode and ProductId explicitly (e.g. to your WiX values) is a valid option:

project.UpgradeCode = <whatever>;
project.ProductId =  <whatever>;

So yeah, I do regret not starting with Wix#, for the record. :/

Understandably :)

Do you have any workflow hints for getting all the info in the wxs & wxi files into Wix# code? I'm sure it's just basically a manual translation job - any shortcut tips would be welcome!

I think you are right, unfortunately it is a manual approach mainly.

Tough you can include some big chunks of wxs and wxi directly into your .cs

Have a look at InjectXML sample

Thanks Oleg. Oh, I think I distracted you from the original topic about the UpgradeCode docs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

meytes picture meytes  路  5Comments

UweKeim picture UweKeim  路  5Comments

yfnfif picture yfnfif  路  3Comments

mgkeeley picture mgkeeley  路  5Comments

ltemimi picture ltemimi  路  5Comments