Problem: ContinueFileOpenPicker, the file reading action is success in debugging mode (even in release build), but not success when the release APP running independently.
I read a text file in my window 8.1 phone by using a file picker,
in debug mode, the file picker return the file and showing waiting to restore to my APP, and the reading is SUCCESS.
but when I run the APP directly, the file picker return to my APP straight away without waiting, then within seconds later my app crashed, perhaps read some lines but not all.
the code for reading are as following.
public async void ContinueFileOpenPicker(FileOpenPickerContinuationEventArgs args)
{
try
{
int nRecords = await ImportACUFile(files[0]);
}
catch (Exception ex)
{
}
}
public async Task<int> ImportACUFile(StorageFile acufile)
{
using (var db = new SQLite.SQLiteConnection(DBPath))
{
var lines = await Windows.Storage.FileIO.ReadLinesAsync(acufile);
foreach (var line in lines)
{.....}
.....
}
}
Can anyone help me to identify the problem is?
THANKS A LOT AHEAD!!!
LONG