windows runtime - WinRT embedded assets can only have known/specific file extensions? -
in developing winrt 8.1 app, think uri has of known file extensions? correct? example, next snippet cause exception on getfilefromapplicationuriasync
phone call if file exists shown:
uri uri = new uri("ms-appx:///assets/lake800x600.flanker"); storagefile file = await storagefile.getfilefromapplicationuriasync(uri).astask().configureawait(false);
however, if alter file extension , uri '.dat' or '.txt' works fine. known issue? why can't refer , utilize files of extension?
you need create sure files marked content included in appx package.
typical info file types such .txt , .jpg default content, you'll need set explicitly other file types.
compare text file:
and .dat file:
you can confirm creating bundle (store.create app packages...), renaming .appx .zip, , opening see files. can check appx folder created in app's bin\debug\appx directory when deploy , run visual studio
windows-runtime uri assets
No comments:
Post a Comment