Can a MSIX package use an external file for user settings?

杀马特。学长 韩版系。学妹 提交于 2020-03-04 21:34:48

问题


We are evaluating the migration from our current client/server application to .NET Core. The 3.0 release added the support for WinForms we need for our client, but ClickOnce will not be supported. Our solution is installed on-premise and we need to include settings (among others) like the address to the application server. We create dynamically ClickOnce packages that can be used to install and update the clients and include the settings. This is working like a charm today. The users install the client using the ClickOnce package and every time we update the software we regenerate these packages at the customer's site and they get automatically the new version with the right settings.

We are looking at MSIX as an alternative, but we have got a question: - Is it possible to add some external settings files to the MSIX package that will be used (deployed) when installing?

The package for the software itself could be statically generated, but how could we distribute the settings to the clients on first install / update?


回答1:


MSIX has support for modification packages. This is close to what you want, the customization is done with a separate package installed after you install the main MSIX package of your app.

It cannot be installed at the same time as your main app. The OS checks if the main app is installed when you try to install the modification package and it will reject its installation if the main is not found on the machine.

The modification package is a standalone package, installed in a separate location. Check the link I included, there is a screenshot of a PS window where you can see the install path for the main package and the modification are different.

At runtime (when the user launches the app) the OS knows these two packages are connected and merges their virtual files and registry system, so the app "believes" all the resources are in one package.

This means you can update the main app and the modification package separately, and deploy them as you wish.

And if we update the modification package itself (without touching the main), will it be re-installed to all the clients that used it?

How do you deploy the updates? Do you want to use an auto-updater tool over the internet? Or ar these users managed inside an internal company network and get all the app updates from tools like SCCM?

The modification packages were designed mostly for IT departments to use them, and this is what I understood you would need too.

A modification package is deployed via SCCM or other tools just like the main package, there are no differences.

For ISVs I believe optional packages are a better solution.



来源:https://stackoverflow.com/questions/60147009/can-a-msix-package-use-an-external-file-for-user-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!