0

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?

Raul
  • 671
  • 1
  • 7
  • 24

1 Answers1

2

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.

Bogdan Mitrache
  • 10,536
  • 19
  • 34
  • Thank you @Bogdan Mitarche. Will the modification package be automatically re-installed when updating the main package? And if we update the modification package itself (without touching the main), will it be re-installed to all the clients that used it? – Raul Feb 13 '20 at 07:54
  • You welcome. See my update answer for your questions. – Bogdan Mitrache Feb 13 '20 at 12:16
  • We install/update our server using a setup. After we install the server, we have got a method that dynamically generates the ClickOnce package for the clients. The ClickOnce package includes the settings for the client (things like the server's address). This method is used as well when the administrator modifies some important settings that should be redeployed to all clients. The ClickOnce package is used to install the clients from a local folder or a http url. When we recreate them the clients are automatically updated as the ClickOnce package is configured to check for updates on start. – Raul Feb 19 '20 at 10:34
  • For this case I think that Optional Packages are more suitable. I haven't used this functionality yet, but you can find more details here: https://learn.microsoft.com/en-us/windows/msix/package/optional-packages – Bogdan Mitrache Feb 20 '20 at 09:19
  • Thank you again, Bogdan! I just applied for the MSIX Packaging Tool Insider Preview and hope that we can evaluate if we can use it for our scenarios. I mark your answer as accepted as it helps us. – Raul Feb 21 '20 at 10:27
  • Glad I could Help Raul. Since your app is under active development you can use Visual Studio to generate the MSIX package. The MSIX Packaging Tool is a solution for IT Pros, which usually don't have access to the source code of the app. Here is a guide from MSFT: https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-packaging-dot-net – Bogdan Mitrache Feb 24 '20 at 08:27