I just created a new XAML / C # application for the Windows Store in Visual Studio. I tried to create a file in the Documents folder using this code:
// DEBUG ONLY: StorageFile file = await KnownFolders.DocumentsLibrary.CreateFileAsync("Hey lol.txt");
But he throws this exception (which I expected):
WinRT Information: Access to a specified location (DocumentsLibrary) requires the ability to declare in the manifest.
This is normal. I was expecting this. So I go to Package.appxmanifest and go to the Capabilities tab, and, to my surprise, there is no “DocumentLibrary” feature.
How to enable it if it does not exist yet?

source share