Package Support Framework

Running Win32/WPF applications inside a MSIX container is a different paradigm. While there are benefits, the container also can cause issues with applications when you simply repackage them without making changes to the application source.


To help with the MSIX transition, Microsoft has created the Package Support Framework (PSF) - an open-source framework that enables you to apply runtime fixups for issues that might appear when migrating legacy applications.


Conceptually, the PSF works using fixups that are injected into applications to modify the application behavior, as shown in the following diagram:


Integrating the Package Support Framework
Integrating the Package Support Framework

Inside the Package Support Framework (PSF)

The official Microsoft release for the Package Support Framework (PSF) is available on GitHub - MSIX Package Support Framework.


Under the hood, the Package Support Framework uses the Detours technology, an open-source framework for handling API redirection and hooking. Aside from allowing you to move forward in instances when you can't access the source code, this technology will also help make your application smarter.


With this framework, you can either choose to use predefined fixups or create a new fixup yourself. Since creating custom fixups is more of a developer matter, we will limit our focus on how to use the predefined fixups.


To start using PSF inside your MSIX package, you don’t need the entire software that is in the GitHub repository for the PSF, as this includes additional content to help with testing the PSF itself.


These are the main resources that must be included into your MSIX package in order to use the PSF:

  • PsfLauncher - Necessary to use the PSF.
  • The PSF runtimes - these should be included depending on your application’s architecture.
  • A config JSON - specifies and configures the fixups used by your application.
  • The fixups DLL(s) - predefined or any custom ones you might build.

Commercial packaging tools like Advanced Installer, InstallShield, and RayPack provide direct integration with the Package Support Framework and take care of including the binaries listed above semi-automatically (you still need to perform configurations in their GUIs).


If you're using the Microsoft MSIX Packaging Tool, you will probably want to use a free third-party tool that we mentioned above called PsfTooling to provide a GUI tool to inject and configure pre-built PSF components.


Once you have defined the traditional app form, either by a recapture or by building an installation ingredient list, you would then add the appropriate PSF file to the package, followed by changing out a shortcut, and adding a configuration file that tells PSF what to do. Most of the tools mentioned above do this automatically.