2

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 ?

norekhov
  • 3,915
  • 25
  • 45
  • 1
    Use the FieldMedic App to capture ETW data. Use the profile from my answer (http://stackoverflow.com/a/30289933/1466046) and also activate the DotnetRuntime Private provider with the FusionKeyword keyword (0x4) (http://stackoverflow.com/a/29374658/1466046). Connect the Phone to the PC via USB, open the folder ‘This PC\Windows Phone\Phone\Documents\FieldMedic\CustomProfiles’ in Explorer and copy the WPRP file to it. Run the App, select the profile under advanced "Custom Group". Start logging, run your app, stop logging. copy the ETL to the PC and analyze it with PerfView or WPA (generic events) – magicandre1981 Jun 09 '15 at 17:36
  • How to activate DotnetRuntime private on a phone? Also I don't see Generic Messages from Microsoft-Windows-DotNetRuntime. Maybe it's a reason. – norekhov Jun 10 '15 at 08:30
  • ok, I've tried it and logging fails. I need to figure out what fails. I'll test it later and report back. – magicandre1981 Jun 10 '15 at 17:56
  • 1
    ok, I found this: https://msdn.microsoft.com/en-us/library/windows/hardware/mt131835%28v=vs.85%29.aspx and checked the folder **C:\Program Files (x86)\Windows Kits\10\Manifests**, but no CLR manifest, so the phone doesn't have CLR ETW events to capture :( – magicandre1981 Jun 11 '15 at 16:04
  • ok, I used fieldMedic and activated the App-Performance profile under Windows Phone 8.1 GDR2. When I now open the ETL on my PC with PerfView, I see the CLR and CLR Private data. Look if this includes the Exception and fusion data. – magicandre1981 Jun 23 '15 at 03:56

1 Answers1

0

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.

Arun
  • 3
  • 5