我们的win10app早期在Win10Store中被接受,没有问题,但是现在新的Win10S需求似乎会导致认证/测试阶段失败,尽管appx包已经有一年没有改变了。App似乎没有通过认证,因为app提供了一个文件写入失败/访问被拒绝。
我们的destop桥接应用程序只是将数据文件存储到%appdata%文件夹中,在Win10S和Windows10Desktop中编写用户自己的数据文件的正确路径是什么?
发布于 2017-11-10 11:33:26
UWP应用程序应该将本地数据写入本地应用程序文件夹:
%localappdata%\Packages\[app-package-name]\LocalState它通常通过由StorageFolder属性返回的ApplicationData.LocalFolder对象访问。
using Windows.Storage;
using System.Threading.Tasks;
// Get the app's local folder.
StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
// Create a new file in the current folder.
// Raise an exception if the file already exists.
string desiredName = "test.txt";
StorageFile newFile = await localFolder.CreateFileAsync(desiredName, CreationCollisionOption.FailIfExists);您可以在桌面桥接应用程序中使用相同的代码来访问应用程序的本地文件夹。
https://stackoverflow.com/questions/47220240
复制相似问题