system.io.fileinfo is not working in my main project

if i use some code like this in my big project:

FileInfo myfile = new FileInfo("myfile.txt");
print("length:"+myfile.Length);

then i get the following in the player:

Assets/augmentedEDU/scripts/processes/process_updateModule.cs(288,47): error CS1061: Type `System.IO.FileInfo' does not contain a definition for `Length' and no extension method `Length' of type `System.IO.FileInfo' could be found (are you missing a using directive or an assembly reference?)

The interesting thing is, if i create a new project and do the same code it works.
can somebody point me to the right direction please?

is your “big project” a webplayer? if so it won’t work

1 Like

it is not a webplayer project.
in the build settings, the windows plattform is active

hmm i think it works now, i maybe needed a restart or something
thanks