[wix-devs] Selection of compatible VS instances

Heath Stewart heaths at outlook.com
Mon Jan 23 17:56:12 PST 2017


While working on (at leas for now) final changes for the WIP re: WixVSExtension, I’m wrestling with a particular scenario and wanted some feedback before I write up the details.

Because an MSI could install multiple VsixPackages and because I’ve decided (open to other suggestions, though) that the VsixPackage/@Vital attribute should mean, for VS2017 extensions, “if no instances are found for this extension, fail the install”, I need to associate the instance IDs per-package.

Right now, there is no table that ships in the MSI.

Already, I’m planning for a “VsixDependency” table that associates the VsixPackage/@File ID with package ID attributes (Id (req), Versio, Chip, and Language). For any instances where all dependencies are found, keep a comma-delmited list you can pass to a new /instanceId:[ids] parameter to VSIXInstaller.exe. However, I need to keep track of those IDs per-package.

My current thought is a VsixPackage table with a VsixPackage ID field (required field – authorable but generated from VsixPackage element), ActionProperty (generated using GenerateIdentifier() with the component and file IDs – much like the CA Ids), and Attributes field (at least for now, keeping track of VsixPackage/@Vital). In that case, the VsixDependency would take VsixPackage/@Id attribute value (VsixPackage.VsixPackage column).

If a new property is set – VS_INSTANCE_ID (comma-delimited list of instance IDs) – all those ActionProperty values are set to that list. The assumption is that users passed it on the command line, or a BA (or other external UI) pre-queried and passed it. If not, I’ll enumerate each instance, keep track of instance IDs containing required workloads or components, and if any of the VsixPackage rows are vital fail if its ActionProperty is not set. If all that passes, then each ActionProperty is passed to build-time generated CAs (basically what exists today) using syntax like: {/instanceId:[ActionProperty]}.

Basically, each VsixPackage can have its own (or share one, I suppose) ActionProperty that determines the list of instances. If instances are passed, those are used.

This also means that any messages the CA sends that a BA can respond to (Bob, can you elaborate on your feedback regarding this? I can only send messages from CAs within the MSI.) would have to pass not only instance ID and display information, but also the file and/or component ID. Or send all the information packaged together at once and let UI decide how to show them – perhaps only the intersection. I doubt many packages will ever have more than one VsixPackage anyway, but certainly want to support the case where they do.

Thoughts?

At least the VSIXInstaller.exe takes multiple instance IDs now so I don’t have to schedule a bunch of CAs at install-time. I prefer a more declarative approach as much as possible. The existing CAs can be used with little modification (the CAs are about discovering where VSIXInstaller.exe is going forward – existing reg searches will remain – and selecting compatible instances; VSIXInstaller.exe still does most of the work).

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



More information about the wix-devs mailing list