Now for a couple of times I discovered the following behavior and wonder if others have seen this too.
I have a NETMF application using SD card to access files for read and write. I think the following steps best describe what and when the io errors happen.
- Format SD card on PC
- Copy all necessary files used by the NETMF application to the SD card
- Insert SD card in NETMF device and run the application.
Everything fine so far… The NETMF application has read and written to SD card in the meantime - Shut down application and remove SD card
- Place SD card in PC card reader
- Copy new files to SD card
- Remove SD card from PC and insert the card in the NETMF device and start NETMF device
- The NETMF application tries to access (streamreader) the newly copied files
Any access to the newly copied file result in a NETMF IO exception - Move again SD card from NETMF device to PC
- Run ChkDsk… (No errors)
- Copy all Files from SD card to a temporary folder on PC
- Format SD Card
- Copy all files back
- Move SD card from PC to NETMF device.
Everything runs fine again.
So it seems that the problem shows up after the netmf device has written to the SD card and after that files are copied to the SD card on the PC