Not implemented? Strange. So I do some poking around and find an answer back from 2010 that advocated using this line instead:
string[] drives = Directory.GetLogicalDrives();
However, this results in the exact same error! I can’t believe it’s simply “not implemented”, I mean, there are a few different threads around pointing to the one I linked above from several years ago, advocating this code as the correct and working solution.
Did something change in 5.2.1f1, or perhaps is it not set up to work for Windows 10? I’m at a loss.
Upon further investigation, the API calls I used are fully functional in a blank project in 5.1.2 without any problem, even on the 2.0 Subset compatibility level.
I tried doing a clean clone of my repository (since all the visual studio project files, library folder, etc are all ignored) and after regenerating everything it didn’t solve the problem. I guess the next step is to reimport everything into a fresh project and see what happens.
Bah! Never mind, the problem was actually linked to DriveInfo not being implemented, which I can easily work around. The line number blowing up in DriveInfo.cs just so happened to be a valid line in my own script. Damn dense stack traces!
I mean, I don’t know why making a DriveInfo would be unimplemented either, especially since it’s listed on the mono compatibility list, but oh well. Glad I didn’t have to waste a day on reimporting.