Launching with missing optional dependency dll

Андрей Вахрушев 96 Reputation points
2020-08-06T09:55:10.823+00:00

Our app uses third party library that is referencing mfplat.dll (and mfreadwrite.dll) of Media Foundation. MF dlls are usually present in the OS, except apparently on Windows N where media component is not installed by default. When launched on Windows N, our app closes instantly. Digging into the problem reveals a system error

The code execution cannot proceed because MFPlat.DLL was not found. Reinstalling the program may fix this problem.

As far as I can tell, the launch is being aborted at very early stages without giving any of our or the librarys code a chance to handle the error. Can't quite find a desription of initial dependency resolution process for UWP, but logically shouldn't absent-by-design system dependency turn into a runtime error to a LoadPackagedLibrary() call, where we could at least handle it gracefully?

Developer technologies Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Richard Zhang-MSFT 6,936 Reputation points Microsoft Employee Moderator
    2020-08-06T11:22:11.287+00:00

    Hello,

    Welcome to Microsoft Q&A.

    Currently, UWP does not provide related events or entrances for intervening when the application resolves dependencies.

    You can choose to include the DLL in the package and add the corresponding reference. or you can ask the user to install the required DLL in the application description.

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.