// DEBUG ONLY: StorageFile file = await KNownFolders.DocumentsLibrary.CreateFileAsync("hey lol.txt");
但它抛出了这个异常(我预期):
WinRT information: Access to the specified location (DocumentsLibrary) requires a capability to be declared in the manifest.
哪个好.我期待它.所以我转到Package.appxmanifest并转到Capabilities选项卡,令我惊讶的是,没有列出“DocumentsLibrary”功能.
如果它不存在,我该如何启用它?
解决方法
[Although] this capability is gone just from the UI,you still can open appxmanifest source and manually add the capability. The result will probably be the same as before – failure of certification for individual developers,so you better stay away from this trick. Microsoft strongly recommend against using Documents Library capability,suggesting Folder and File Pickers instead.
原文地址:https://www.jb51.cc/csharp/96609.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。