KnownFolders.PicturesLibrary access is denied

Viewed 559

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))'
1 Answers

The answer is also in the docs

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

Related