Tech Community Live: Windows edition
Jun 05 2024, 07:30 AM - 11:30 AM (PDT)
Microsoft Tech Community

Sharing temporary data under %appData% of MSIX app with MSI application

Copper Contributor

Dear Members,


My App is .Net Framework 4.8.1 based WPF app.

Packaged in MSIX installer to distribute as Store App.


I have a use case to share temporary file data created by WPF packaged app with other desktop application. This is temporary data which will be created while executing a feature and will be deleted after completion of feature execution.


When data is kept under %appdata%/ LocalCache, it is accessible by other desktop application.

Does this kind of sharing violates any Appx principles or rules of Store App?


Thank you.


2 Replies

Gemini response.
No, sharing temporary data under %appdata%/LocalCache with other desktop applications does not violate Appx principles or Store App rules on Windows, as long as the data is properly secured and cleaned up after use.

Requesting moderators to confirm the response.

One thing that I noticed when I had MSI and MSIX packages sharing the same directory LocalAppData/Packages/.../LocalCache was that without the following set to force the MSIX not use the Local Cache

<rescap:Capability Name="unvirtualizedResources" />

Was that on a clean machine that hadn't seem the MSI version, then files would be created under the LocalCache directory. But, if the MSI had been installed and the product run up then files created by the MSIX wouldn't end up in the LocalCache but rather they would be written to LocalAppData.

So sometimes files and configuration data were being left behind on uninstall, and then picked up by the next release of the MSIX package which caused a lot of confusion.

I would try to avoid having both the MSI & the MSIX versions of a product even existing, or as shown above disable File Virtualization for you MSIX packages so the MSI & the MSIX all work from the same directory.