Unity doesn’t use .NET, so whatever framework you have installed isn’t relevant. I expect you have the platform set to webplayer, which doesn’t work with System.IO stuff for security reasons.
Do you think that they expressly barred the use of Getfiles .AllSubDirectories because they were worried that someone could gain access to user’s documents by sending out a package with a getfiles to retrieve any document files from a computer?
That’s very right of them however the other directory commands should be barred as well.
Because, why would the compiler recognize one System.IO function in my script and not another one.
Indeed i get confused about .net implementation in unity, it’s written .net 2.0 at the bottom of player settings. (the PC/MAC/Linux of player can’t compile it.
None of the System.IO commands will actually work in a webplayer; they’ve expressly barred everything. Not sure about what compiles or not though. Unity uses Mono rather than .NET.