Kirsten
Kirsten

Reputation: 18198

KnownFolders.PicturesLibrary access is denied

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

Upvotes: 3

Views: 715

Answers (1)

Kirsten
Kirsten

Reputation: 18198

The answer is also in the docs

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

Upvotes: 1

Related Questions