StereoKit: Develop branch: OOB code builds UWP fails to start: A dependent dll was not found.
Description
UPDATE: The issue is more than a missing dll. All builds since preview 9 fail to run locally on Windows or fail to run in HoloLens. Preview 9 runs on Windows and runs in HoloLens. The latest preview 1639 has the errors mentioned below but this is a deeper problem on the Windows platform.
Download a fresh SK Develop branch zip file. Unblock the file in properties. Extract all files to a folder. Open folder properties and uncheck the readonly mark, and select folders, subfolders, and files. Follow instructions int Build.md document for Windows only. Note now you must also drop the Maui project from the solution. To build set StereoKit (Core/SteroeoKit) as startup project. Next open solution configuration manager and check only these projects: StereoKit, StereoKitC, and StereoKitC_UWP. Build the solution. Then open configuration manager and uncheck the three projects just built. (The order of build execution in VS will fail if you don’t build the core components first.) In configuration manager check StereoKitTest to build and deploy. Then set StereoKitTest as the startup project. Build and run. This should operate normally on a Windows computer.
This is where it fails: Assuming you have followed the steps above, in configuration manager uncheck all projects. Next check only StereoKitTest_UWP to build and deploy. Then set StereoKitTest_UWP as the startup project. Build will succeed. Next run the app in VS debugger by starting the app. The app will build and launch. The app will momentarily start then immediately close with an error that application cannot start with instructions to see the output Window (shown below). Windows UWP apps that fail to start do not report to the debugger what has caused the failure. Knowing only that a least one dependent file was missing I needed to determine which and if there were others. Using Process Monitor, I captured all the processes Windows executed. From this (see zipped csv) it seems that a number of dependent files are not in the folder deployed by the UWP. SK_Process_Logfile.zip
Platform / Environment
Windows 11, VS2022, SK Dev branch code download branch 07/22/2023
Logs or exception details
The program ‘[9052] StereoKitTest_UWP.exe’ has exited with code 3221225781 (0xc0000135) ‘A dependent dll was not found’.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Users\useraccount\source\SK-develop\bin\x64_Debug_UWP\StereoKitTest_UWP\AppX\StereoKitTest_UWP.exe'. Module was built without symbols.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\normaliz.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe\mrt100_app.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Users\useraccount\source\SK-develop\bin\x64_Debug_UWP\StereoKitTest_UWP\AppX\StereoKitC.dll'. Symbols loaded.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.32530.0_x64__8wekyb3d8bbwe\vcruntime140_app.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\MMDevAPI.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'.
'StereoKitTest_UWP.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'.
The thread 0x3254 has exited with code 3221225781 (0xc0000135).
The thread 0x3e44 has exited with code 3221225781 (0xc0000135).
The program '[9052] StereoKitTest_UWP.exe' has exited with code 3221225781 (0xc0000135) 'A dependent dll was not found'.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 24 (4 by maintainers)
This morning I tested the VS2022 StereoKit visx template, with StereoKit 0.3.7 preview 1739 in a new project and it was successfully run on HoloLens 2 that is upgraded to build 22621.1125 (23H1 August). No code was added or changed in the project from the template. The template was upgraded to target Windows 11 22H1 (22621). The nuget updates were installed which resulted in the Microsoft.NETCore.UniversalWindows being upgraded to version 6.2.14 and StereoKit being update to the preview 1739. I think this issue is resolved.
Awesome, that works like a charm! Huh so MSFT’s 1st-person observer just hangs out in the background until you take a mixed reality photo eg. Maybe this fix is helpful for varjo development too if it outputs multiple. Thanks so much!
@laultman could you confirm the latest dev/build with your app?