windows phone 8.1 RT 文件创建错误
windows phone 8.1 RT error with files creation
根据本教程:
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh758325.aspx?f=255&MSPPError=-2147217396
我编写了以下函数:
private async void WriteToFile()
{
StorageFolder folder =
Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile sampleFile =
await folder.CreateFileAsync("sample.txt", CreationCollisionOption.ReplaceExisting);
}
但是,如果我 运行 它,我会看到以下错误:
Exception thrown: 'System.ArgumentException' in mscorlib.ni.dll
Use of undefined keyword value 1 for event TaskScheduled.
为什么?我该如何解决这个问题?
它给出了这样的错误
"Additional information: Use of undefined keyword value 1 for event TaskScheduled"
所以可能 sample.txt 无法定义为其未定义的关键字。
将文件名更改为其他名称或"sample1.txt",它将起作用。
private async void WriteToFile()
{
StorageFolder folder =
Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile sampleFile =
await folder.CreateFileAsync("sample1.txt", CreationCollisionOption.ReplaceExisting);
}
根据本教程: https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh758325.aspx?f=255&MSPPError=-2147217396
我编写了以下函数:
private async void WriteToFile()
{
StorageFolder folder =
Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile sampleFile =
await folder.CreateFileAsync("sample.txt", CreationCollisionOption.ReplaceExisting);
}
但是,如果我 运行 它,我会看到以下错误:
Exception thrown: 'System.ArgumentException' in mscorlib.ni.dll
Use of undefined keyword value 1 for event TaskScheduled.
为什么?我该如何解决这个问题?
它给出了这样的错误 "Additional information: Use of undefined keyword value 1 for event TaskScheduled" 所以可能 sample.txt 无法定义为其未定义的关键字。
将文件名更改为其他名称或"sample1.txt",它将起作用。
private async void WriteToFile()
{
StorageFolder folder =
Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile sampleFile =
await folder.CreateFileAsync("sample1.txt", CreationCollisionOption.ReplaceExisting);
}