Read a text file in WP7
in order to test my WP7 application with the emulator, I have to read a text file with a large input. I have some problem to read it and to use the isolate storage. More in details, th开发者_C百科e application is not able to read the file from my local disk. How can i put the txt file into isolate storage? Many thanks
Justin Angel has a blog post showing how to automate the emulator (for testing purposes) and it also includes details of how to copy files directly to the isolated storage for an app:
http://justinangel.net/WindowsPhone7EmulatorAutomation
See this question: Open a project file in phone7
I give an example of how to access a file (resource) from your project and also how to copy that resource to isolated storage and access it as needed.
A simple way to test this would be to package the file in the XAP. If you don't need to modify the file while your app is running you can leave it there and just read it. Alternatively you can load it down to isolated storage at a convenient time while your app is running.
精彩评论