Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not open the UWP App: System.IO.FileLoadException

See original GitHub issue

I compile successfully according to the description in, but an exception is thrown after clicking open app after running

“MyPhone.exe”(CoreCLR: DefaultDomain): 已加载“C:\Program Files\WindowsApps\Microsoft.NET.CoreRuntime.2.2_2.2.29713.2_x64__8wekyb3d8bbwe\System.Private.CoreLib.dll”。
“MyPhone.exe”(CoreCLR: CoreCLR_UWP_Domain): 已加载“D:\VSWrokspace\MyPhone\PackageProject\bin\x64\Debug\AppX\entrypoint\MyPhone.exe”。已加载符号。
“MyPhone.exe”(CoreCLR: CoreCLR_UWP_Domain): 已加载“D:\VSWrokspace\MyPhone\PackageProject\bin\x64\Debug\AppX\System.Runtime.dll”。
“MyPhone.exe”(CoreCLR: CoreCLR_UWP_Domain): 已加载“D:\VSWrokspace\MyPhone\PackageProject\bin\x64\Debug\AppX\WinMetadata\Windows.winmd”。模块已生成,不包含符号。
“MyPhone.exe”(CoreCLR: CoreCLR_UWP_Domain): 已加载“C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.2_2.2.29301.2_x64__8wekyb3d8bbwe\mscorlib.dll”。
“MyPhone.exe”(CoreCLR: CoreCLR_UWP_Domain): 已加载“D:\VSWrokspace\MyPhone\PackageProject\bin\x64\Debug\AppX\System.Runtime.InteropServices.WindowsRuntime.dll”。
“MyPhone.exe”(CoreCLR: CoreCLR_UWP_Domain): 已加载“C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.2_2.2.29301.2_x64__8wekyb3d8bbwe\System.Runtime.WindowsRuntime.dll”。
引发的异常:“System.IO.FileLoadException”(位于 MyPhone.exe 中)
“System.IO.FileLoadException”类型的异常在 MyPhone.exe 中发生,但未在用户代码中进行处理
Could not load file or assembly 'System.Runtime.InteropServices.WindowsRuntime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I am a novice developer of win. After Google search, I found that there may be a version conflict. The version specified in the package reference is inconsistent with the local installation, but I don’t know how to locate and solve the problem. I hope to get your guidance. Thank you! I found that you are a Chinese, if it is convenient, I can trouble you to communicate in Chinese. Hope to receive your reply!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

BestOwlcommented, Mar 13, 2022

This issue will be solved after #9

BestOwlcommented, Oct 30, 2021

Just tested on Visual Studio 2022 (v17.0.0 Preview 4.1), the UWP app launch successfully.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FileNotFoundException (Could not load file or assembly) ...
FileNotFoundException (Could not load file or assembly) thrown when using a .NET standard library in a full trust win32 component of UWP app....
Read more >
[Bug]System.IO.FileLoadException : 'Could not load file or ...
I'm currently working on a Xamarin project available on Android/iOS and UWP. I encounter an issue on UWP at startup that I can't...
Read more >
FileLoadException Class (System.IO)
The FileNotFoundException exception is thrown when the file fails to load because it cannot be located. If the file is located, but cannot...
Read more >
[UWP] Could not find or load a specific file. (Exception from ...
My UWP app is throwing exception and crashing on start up giving the following error in the file XamlTypeInfo.g.cs System.IO.
Read more >
[Visual Studio 2019 version 16.10][UWP][Xamarin] Runtime ...
Hi, I'm having the same issue (System.IO.FileLoadException: Could not load file or assembly 'System.Threading, Version=, Culture=neutral, PublicKeyToken= ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found