Non-invocable member ‘File’ cannot be used like a method while generating Reports

I used a method for generating report in my previous project and tried to use the same method in the new project. However, I encounter “Non-invocable member ‘File’ cannot be used like a method” error and File cannot be recognized. By looking at the references of file, it seems to be FileContentResult Controller.File() in the previous project, but System.IO.File() in the new project (even if I remove using System.IO; from the references lines, I encounter “The name ‘File’ does not exist in the current context” error). Any idea to fix the problem?