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);
}
任何幫助嗎?
那麼簡單!它現在正在工作。 –