次のコードがあります
// Point to c:\users\yancheng\documents\visual studio 2012\Projects\App5\App5\bin\x86\Debug\AppX
StorageFolder storageFolder = Windows.ApplicationModel.Package.Current.InstalledLocation;
StorageFile file = await storageFolder.CreateFileAsync("1000.txt");
if (file != null)
{
using (IRandomAccessStream writeStream = await file.OpenAsync(FileAccessMode.ReadWrite))
{
using (DataWriter dataWriter = new DataWriter(writeStream))
{
dataWriter.WriteInt32(1000);
}
}
}
を通じてすべての権限を有効にしましPackage.appxmanifest
た。UnauthorizedAccessException
ただし、なぜまだstorageFolder.CreateFileAsync
.
私が見逃していた他のものはありますか?