#### Exception System.IO.IOException - CLR_E_INVALID_DRIVER (1) #### #### Message: #### Microsoft.SPOT.IO.NativeIO::GetAttributes [IP: 0000] #### #### System.IO.FileStream::.ctor [IP: 005c] #### #### NetduinoPlusWebServer.Program::Main [IP: 007c] #### A first chance exception of type 'System.IO.IOException' occurred in Microsoft.SPOT.IO.dll A first chance exception of type 'System.IO.IOException' occurred in System.IO.dll An unhandled exception of type 'System.IO.IOException' occurred in System.IO.dll
I have a 2GB card, formatted to FAT32. Netduino plus is running 4.1.1 Alpha 3.
This is the code I'm trying to run:
FileStream fs = new FileStream("\\SD\\test.txt", FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, 512); StreamWriter sw = new StreamWriter(fs); sw.WriteLine("hello from netduino"); sw.WriteLine("done.");
Exception is thrown on the first line. I haven't been able to find anything about the CLR_E_INVALID_DRIVER exception, so I'm not sure what to try to fix it. Unfortunately I don't have another micro SD card to try.
Any suggestions?