@ Gus -
I have tried many things, but does also not working on GameO with NETMF directly.
(on using PersistentStorage throws NotSupported exception, thats may be ok)
Did you have or someone else an idea?
- 2 different Transcent MicroSD 2 GB (tried with 16/32/64k blocksize)
- VST 2012 / Win8
- .NETMF and Gadgeteer Package 2013 R2
- .NET MF 4.3 (RTM)
- GameO aktualized with FEZ_Config_v013.exe (no options changed)
here is some of my test code:
using System;
using Microsoft.SPOT;
using System.IO;
using Microsoft.SPOT.IO;
namespace TestMicroSD
{
public class Program
{
public static void Main()
{
// The event never occurs
RemovableMedia.Eject += RemovableMedia_Eject;
RemovableMedia.Insert += RemovableMedia_Insert;
string currentDirectory = Directory.GetCurrentDirectory();
// Output: >> "\\"
string[] fileSystems = VolumeInfo.GetFileSystems();
// Output: >> "FAT"
VolumeInfo[] volumeInfos = VolumeInfo.GetVolumes();
// Output: >> returns VolumeInfo[0] = empty ???
// Throws System.IO.IOException
StreamWriter writer = new StreamWriter("\\test.txt");
writer.WriteLine("Hello Disc");
writer.Flush();
writer.Close();
}
static void RemovableMedia_Insert(object sender, MediaEventArgs e)
{
// Never occurs on eject
}
static void RemovableMedia_Eject(object sender, MediaEventArgs e)
{
// Never occurs on insert
}
}
}