请帮帮我,我在一些异步方法中使用 C# 编写了以下代码行,并且我使用的是通用 Windows 平台(Windows 10 SDK 10.0.14393):
var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/HamburgerMenuItems.json"));
问题是这个异常:System.IO.FileNotFoundException occurred in mscorlib.ni.dll。
Visual Studio 向我显示该文件位于 Assets 文件夹中并且文件正常,因为它可以正常打开(它是非常短的 json 文件)。可能是什么问题或者这个问题的解决方案是什么?
最佳答案
关于c# - 通用 Windows 平台中找不到文件异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38776253/