2014-07-13 78 views
0

我想弄清楚這裏可能會出現什麼問題。當我通過Visual Studio運行下面的代碼時,與調試器連接時,所有工作都應該如此。但是,當我運行沒有任何連接到Visual Studio的應用程序時,應用程序立即崩潰。當沒有連接到調試器時FolderPicker崩潰

是否有我缺少的東西 - 我已經對我的應用程序中的延續進行了必要的更改,並且所有內容都按預期工作。只是當我離開Visual Studio時。

FolderPicker folderPicker = new FolderPicker(); 
folderPicker.ContinuationData["Operation"] = "DownloadFile"; 
folderPicker.SuggestedStartLocation = PickerLocationId.Downloads; 
folderPicker.PickFolderAndContinue(); 

回答

0

好吧,想出了這一個。出於某種原因,它是

continuationManager.MarkAsStale(); 
OnSuspending()

App.xaml.cs刪除該修復的問題。

注意這也停止了應用程序顯示在多任務部分。

相關問題