How to debug missing dlls on Windows 10

2.2k views Asked by At

I've got a Windows 10 ( Windows Universal ) project upgraded from Windows 8.1.

I try to launch this on Windows 10 phone and get

System.IO.FileNotFoundException

when it first time tries to refer to my Windows Runtime Component.

System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD) at FooRuntimeComponent.STAContextCapture.CaptureContext() at FooApp.App..ctor() at FooApp.Program.<>c.b__0_0(ApplicationInitializationCallbackParams p)}

Exception itself doesn't tell me which module is not found. Here's a list of first level dependencies:

API-MS-WIN-CORE-HANDLE-L1-1-0.DLL
API-MS-WIN-CORE-SYNCH-L1-2-0.DLL
API-MS-WIN-CORE-PROCESSTHREADS-L1-1-2.DLL
API-MS-WIN-CORE-UTIL-L1-1-0.DLL
API-MS-WIN-CORE-ERRORHANDLING-L1-1-1.DLL
API-MS-WIN-CORE-STRING-L1-1-0.DLL
API-MS-WIN-CORE-COM-L1-1-1.DLL
MMDEVAPI.DLL
VCCORLIB140D_APP.DLL
MSVCP140D_APP.DLL
KERNEL32.DLL
OLE32.DLL
CONCRT140D_APP.DLL
VCRUNTIME140D_APP.DLL
UCRTBASED.DLL
WS2_32.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-1.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL

If I try to reference and use empty Windows Runtime Component it works.

I tried to recreate project from scratch still not working.

Seems that some of this dlls is missing on the phone. How to understand which one? Is there a FusLogW for VS2015 on Windows 10 ?

1

There are 1 answers

0
Arun On

It might be because of your dependency on ole32.dll.

I had a similar issue on Xbox. My assumption is that in a UWP app, methods in the ole lib are mapped to windows api sets the (API-MS-WIN stuff) and not to the dll itself. ole32.dll might be present in a desktop environment but when you run on other platforms this dll might not be there.