I downloaded the SDK from this website yesterday.
I could not find documentation so I figured out the following code.
However it gives "CLR_E_VOLUME_NOT_FOUND".. What do I do wrong ?
I read something online about mounting and a certain dll (SecretLabs.NETMF.IO.dll ) but I cannot find that dll.
Can anybody help me getting started ?
public class Program { public static void Main() { var dir = Directory.GetCurrentDirectory(); var fileName = Path.Combine(dir, "test.txt"); Debug.Print(fileName); byte[] testBytes = new byte[] { 1,2,3,4 }; File.WriteAllBytes(fileName, testBytes); } }
Output :
\test.txt
#### Exception System.IO.IOException - CLR_E_VOLUME_NOT_FOUND (1) ####
#### Message:
#### System.IO.Path::NormalizePath [IP: 0070] ####
#### System.IO.Path::GetFullPath [IP: 001a] ####
#### System.IO.FileStream::.ctor [IP: 0009] ####
#### System.IO.File::WriteAllBytes [IP: 0012] ####
#### NetduinoPlusApplication1.Program::Main [IP: 0025] ####
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