Tuesday, 15 May 2012

visual studio 2012 - DeleteAsync() Causes FileNotFoundException in C# .NET for Windows Store -



visual studio 2012 - DeleteAsync() Causes FileNotFoundException in C# .NET for Windows Store -

i'm having problem i'm trying delete folder i've created asynchronously. can't seem utilize system.io.file delete synchronously because visual studio express claims not exist. when utilize deleteasync(), folder deletes fine, throws filenotfoundexception, problem because causes programme fail, though folder gets deleted successfully. it's been giving me issues days.

i've initialized folder

storagefolder zip_contents_folder = await applicationdata.current.localfolder.createfolderasync("zip contents", creationcollisionoption.replaceexisting);

and, after extracting zip files it, delete later using

try { await zip_contents_folder.renameasync("trashfile2.xml", namecollisionoption.generateuniquename); await zip_contents_folder.deleteasync(); } grab (exception e_deletezipfolder) { system.diagnostics.debug.writeline(e_deletezipfolder.tostring()); }

edit: output console. it's happening right after 3rd party dll loaded

'indigo.exe' (managed (v4.0.30319)): loaded 'd:\skydrive\visual studio projects\ebook\indigo\bin\debug\appx\ionic.zip.dll' first chance exception of type 'system.io.filenotfoundexception' occurred in mscorlib.dll first chance exception of type 'system.io.filenotfoundexception' occurred in mscorlib.dll first chance exception of type 'system.io.directorynotfoundexception' occurred in mscorlib.dll first chance exception of type 'system.io.directorynotfoundexception' occurred in mscorlib.dll

does know workaround problem?

visual-studio-2012 asynchronous filenotfoundexception

No comments:

Post a Comment