KnownFolders.PicturesLibrary access is denied

1

I am trying to implement the pictures sample in the docs

However I get an exception at

StorageFolder picturesFolder = KnownFolders.PicturesLibrary;

The error is

System.UnauthorizedAccessException: 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))'
uwp
asked on Stack Overflow Nov 8, 2018 by Kirsten Greed

1 Answer

0

The answer is also in the docs

Double click Package.appmanifest in solution explorer. Then go to the Capabilities Tab and check Pictures Library.

answered on Stack Overflow Nov 8, 2018 by Kirsten Greed

User contributions licensed under CC BY-SA 3.0