UWP access denied

前端 未结 2 1870
萌比男神i
萌比男神i 2020-12-11 18:36

Basically, I am having huge difficulty getting a text file to open by my UWP app. I have set the app permissions to be able to access files in \'my documents\' and other opt

2条回答
  •  无人及你
    2020-12-11 19:28

    5 months later...

    It appears Microsoft have now added the capability. Simply add the 'broadFileSystemAccess' capability to the app manifest as described here: https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions

    Note that this still requires user input to some extent (the user must grant permission to file system access on first run of the app) but that the file/folder picker UI is not needed.

    I haven't actually tried this yet but it sounds like it should do the job. I hope it helps people referring to this post in the future.

提交回复
热议问题