13

When running a UWP project I'm working on I receive the following dialog.

"Unable to activate Windows Store app 'MyAppsMangledName'. The 'MyExeName' process started, but the activation request failed with error 'The App didn't start'."

The Visual Studio output has the following.

The thread 0x3d4c has exited with code -1073741515 (0xc0000135). The thread 0x3b50 has exited with code -1073741515 (0xc0000135). The program 'MyExeName' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.

The Event Viewer has 3 events that basically restate the popup dialog in 3 different ways and nothing else.

Running Process Monitor during the startup shows me many dlls being successfully loaded but nothing indicating failure besides some NAMENOTFOUND events which unfortunately don't show what name wasn't found.

In Win32 a helpful dialog usually indicates which dll could not be loaded. And of course with .Net apps the fusion logs make tracing this very straight forward. But for Store/UWP apps I can't seem to find a good way to track down the offending dependency.

DubiousPusher
  • 1,132
  • 2
  • 8
  • 19
  • 3
    Can you please try to use [Dependency Walker](http://www.dependencywalker.com/)? – Grace Feng Apr 01 '16 at 05:18
  • 1
    The problem with Dependency Walker with Store apps is that there is a lot of noise in the report. Everything of the form API-MS-WIN-CORE*.DLL EXT-MS-WIN*.DLL and a few others like DEVICELOCKHELPERS.DLL and EMCLIENT.DLL can't be found by the tool. Making it worse, any package dependency specified in the manifest won't be found either regardless of whether the dependency is resolved at runtime or not. Which was exactly the problem in my case. Being able to run under profiling would probably resolve this but the app must run in a sandbox which Dependency Walker seems to have no notion of. – DubiousPusher Apr 03 '16 at 17:18
  • I made a PowerShell module that finds modules that failed to load for a given module. You can install it with "Install-Module LibSnitcher; Import-Module LibSnitcher". There is a doc in the project page https://github.com/FranciscoNabas/LibSnitcher – FranciscoNabas Aug 21 '23 at 22:54

1 Answers1

21

This just hit me too on a project I'm working on. And after much digging, someone on my team was able to figure it out. So figured I'd share it for others struggling with the same issue.

We're doing UWP with C++ using VS2015. So with that in mind, there is a program called gflags located for me at C:\program Files (x86)\Windows Kits 10\Debuggers\x64\gflags.exe

So you'll want a cmd window with admin, and run the command gflags.exe -i your-program-name.exe +sls

Note: gflags wasn't in my path so either add the path or navigate to where it is before executing the command.

Just pass in the name of the exe without directories. What it does is sets a registry setting for VS that turns on sls (show loader snaps) for exe's matching that name. Then run your application in VS and and you'll get a large amount of dll loading information including names of the dlls that fail to load in your output window. In our case it was this:

5038:34f4 @ 789320468 - LdrpProcessWork - ERROR: Unable to load DLL: "vccorlib140d_app.DLL", Parent Module: "E:\projects---\Source\Builds\vs2015_Debug_UWP_x64\AppX---.exe", Status: 0xc0000135

Another quicker alternative way to test this (YMMV) was to compare the output with another build config that does work. In our case, we can run release builds just fine, but debug builds barf. And the release output showed vccorlib140_app.dll loaded while the debug had it missing.

Kris Morness
  • 574
  • 5
  • 12