0
我正在尝试从我的应用程序文件夹中的文件,但我面对这样的例外:错误HRESULT E_FAIL已经从COM组件的调用返回 - 的Windows 8.1
错误HRESULT E_FAIL已从调用COM组件返回。
System.Runtime.InteropServices.COMException
我试图把文件移出资产的文件夹,并在根文件夹中找到它,但我收到了同样的问题!
这里是我的代码:
try
{
StorageFile data = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx://Assets/data.json"));
//...
}
catch (FileNotFoundException exception)
{
Debug.WriteLine(exception);
}
任何帮助吗?
那么简单!它现在正在工作。 –