The following code works on Mac:
DriveInfo[] allDrives = DriveInfo.GetDrives();
And it correctly returns the single drive with the DriveInfo.Name of “/”.
However, on a standalone windows build, I get an exception instead:
NotImplementedException: The requested feature is not implemented.
System.IO.DriveInfo.GetDrives ()
I ran the following command on both systems:
print(System.Environment.Version);
Both Mac Windows print out:
2.0.50727.42
Here is the msdn link for this for GetDrives() in the .Net Framework 2.0:
I will also note that both of the following work fine:
DirectoryInfo.GetDirectories()
DirectoryInfo.GetFiles()
What is going on here?