Combining optional packages and modification packages

%3CLINGO-SUB%20id%3D%22lingo-sub-2860509%22%20slang%3D%22en-US%22%3ECombining%20optional%20packages%20and%20modification%20packages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2860509%22%20slang%3D%22en-US%22%3E%3CP%3EHi.%20I've%20a%20question%20that%20relates%20to%20both%20optional%20packages%20and%20modification%20packages.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20a%20%22related%20set%22%20consisting%20of%20an%20.msixbundle%20(the%20main%20package)%20and%20an%20.msix%20(the%20optional%20package).%20These%20packages%20are%20for%20sideloading%2C%20not%20for%20the%20Microsoft%20Store.%20Each%20package%20contains%20standalone%20executable%20applications.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20also%20created%20a%20modification%20package%20that%20adds%20additional%20files%20(specifically%2C%20configuration%20files)%20to%20the%20virtualised%20filesystem%20of%20the%20main%20package.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20issue%20I%20have%20is%20that%20I%20want%20the%20applications%20that%20are%20part%20of%20the%20optional%20package%20to%20run%20in%20the%20same%20virtualized%20context%20as%20the%20main%20package.%20Meaning%20that%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20they%20would%20see%20the%20same%20virtualized%20filesystem%3B%3C%2FP%3E%3CP%3E-%20they%20would%20see%20the%20same%20virtualized%20registry%3B%3C%2FP%3E%3CP%3E-%20the%20modifications%20made%20by%20the%20modification%20package%20would%20take%20effect%20also%20for%20the%20applications%20in%20the%20optional%20package%20(so%20installing%20the%20modification%20package%20would%20provide%20configuration%20both%20to%20the%20apps%20in%20the%20main%20package%20and%20to%20the%20apps%20in%20the%20optional%20package).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20the%20observed%20behaviour%20is%20that%20the%20apps%20in%20the%20optional%20package%20have%20a%20separate%20virtualized%20filesystem%20from%20those%20in%20the%20main%20app.%20Is%20there%20a%20way%20to%20change%20this%20so%20that%20they%20see%20the%20same%20virtualized%20resources%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20also%20asked%20a%20couple%20of%20questions%20about%20this%20on%20Stack%20Overflow%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F69619622%2Fhow-do-i-combine-the-capabilities-of-related-sets-and-modification-packages%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F69619622%2Fhow-do-i-combine-the-capabilities-of-related-sets-and-modification-packages%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F69629401%2Fhow-do-i-make-apps-in-my-optional-package-run-using-the-virtualized-file-system%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F69629401%2Fhow-do-i-make-apps-in-my-optional-package-run-using-the-virtualized-file-system%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2861083%22%20slang%3D%22en-US%22%3ERe%3A%20Combining%20optional%20packages%20and%20modification%20packages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2861083%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20plot%20thickens...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20just%20did%20some%20experimentation%20with%20running%20Regedit.exe%20via%20Invoke-CommandInDesktopPackage.%20I%20was%20expecting%20that%20the%20two%20apps%20would%20appear%20to%20have%20separate%20virtualized%20registries%2C%20as%20with%20the%20VFS.%20But%20in%20fact%20it%20seems%20as%20though%20they%20are%20sharing%20a%20virtualized%20registry.%20We%20may%20be%20able%20to%20switch%20to%20using%20the%20registry%20for%20config%20instead%20of%20configuration%20files.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi. I've a question that relates to both optional packages and modification packages.

 

I have created a "related set" consisting of an .msixbundle (the main package) and an .msix (the optional package). These packages are for sideloading, not for the Microsoft Store. Each package contains standalone executable applications.

 

I have also created a modification package that adds additional files (specifically, configuration files) to the virtualised filesystem of the main package.

 

The issue I have is that I want the applications that are part of the optional package to run in the same virtualized context as the main package. Meaning that:

 

- they would see the same virtualized filesystem;

- they would see the same virtualized registry;

- the modifications made by the modification package would take effect also for the applications in the optional package (so installing the modification package would provide configuration both to the apps in the main package and to the apps in the optional package).

 

However, the observed behaviour is that the apps in the optional package have a separate virtualized filesystem from those in the main app. Is there a way to change this so that they see the same virtualized resources?

 

I've also asked a couple of questions about this on Stack Overflow:

 

https://stackoverflow.com/questions/69619622/how-do-i-combine-the-capabilities-of-related-sets-and-m...

https://stackoverflow.com/questions/69629401/how-do-i-make-apps-in-my-optional-package-run-using-the...

2 Replies

The plot thickens...

 

I just did some experimentation with running Regedit.exe via Invoke-CommandInDesktopPackage. I was expecting that the two apps would appear to have separate virtualized registries, as with the VFS. But in fact it seems as though they are sharing a virtualized registry. We may be able to switch to using the registry for config instead of configuration files.

The previous remark about storing configuration in the registry, or indeed in some filesystem location other than in the Program Files folder (alongside the executables) is premature. The design of the relevant facilities in .NET Framework really, really doesn't want you to put (for example) a Connection Strings file anywhere other than at a path relative to the executable. So I need the connection strings file to be in the virtualized file system, but that means that the apps in the optional package are unable to read it because they don't share the same virtualized file system! It is as though whoever at Microsoft designed MSIX did so with deliberate contempt for the people who designed the configuration file system!