WindowsAppSDK
WindowsAppSDK copied to clipboard
Unpackaged x64 C++ WinUI application fails with "Access is denied"
Describe the bug
I created a new WinUI project and converted it to unpackaged using this guide. I made no other modifications and attempted to start it which resulted in the following messages:
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(373)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFBF53880CF: (caller: 00007FFBF53871DB) Exception(1) tid(429c) 80070005 Access is denied. Msg:[Error in LoadLibrary: 5 (0x5) loading C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe\Microsoft.WindowsAppRuntime.dll] CallContext:[\Initialize] Exception thrown at 0x00007FFC1E76CD29 in MiraQ.exe: Microsoft C++ exception: wil::ResultException at memory location 0x0000001C186FCB80. Exception thrown at 0x00007FFC1E76CD29 in MiraQ.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000. \dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(213)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFBF539BB71: (caller: 00007FFBF5386E09) ReturnHr(1) tid(429c) 80070005 Access is denied. Msg:[\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(373)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFBF53880CF: (caller: 00007FFBF53871DB) Exception(1) tid(429c) 80070005 Access is denied. Msg:[Error in LoadLibrary: 5 (0x5) loading C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe\Microsoft.WindowsAppRuntime.dll] CallContext:[\Initialize] ] CallContext:[\Initialize] \dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(166)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFBF5386EF7: (caller: 00007FF63C20B72C) ReturnHr(2) tid(429c) 80070005 Access is denied. CallContext:[\Initialize]
WinAppSDK nuget version: 1.2.221209.1 WinAppSDK runtime: 1.2.221209.1
This does work if I build and run it as x86.
I tried to reinstall the runtimes in case I had an old version laying around that was causing trouble. This is the 1.2X appruntime I have installed now:
Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x86__8wekyb3d8bbwe MicrosoftCorporationII.WinAppRuntime.Main.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe MicrosoftCorporationII.WinAppRuntime.Singleton_2000.707.2303.0_x64__8wekyb3d8bbwe Microsoft.WinAppRuntime.DDLM.2000.707.2303.0-x6_2000.707.2303.0_x64__8wekyb3d8bbwe Microsoft.WinAppRuntime.DDLM.2000.707.2303.0-x8_2000.707.2303.0_x86__8wekyb3d8bbwe
Steps to reproduce the bug
- Create a new Blank App, Packaged.
- Convert it to Unpackaged using this guide.
- Attempt to debug it in x64
Expected behavior
I would expect there to be not be any Access is Denied message.
Screenshots
No response
NuGet package version
Windows App SDK 1.2.2: 1.2.221209.1
Packaging type
Unpackaged
Windows version
Windows 10 version 21H2 (19044, November 2021 Update)
IDE
Visual Studio 2022
Additional context
No response