C# 5.0 Visual Studio Code Intellisense System.IO

Visual Studio Code

Visual Studio Code tells me the type or namespace 'DirectoryInfo' could not be found. Oddly enough though using System.IO; is indeed included. I have gone as far as adding it to the frameworks.

  "frameworks": {
    "dnx451": { },
    "dnxcore50": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Collections": "4.0.11-beta-23516",
        "System.Console": "4.0.0-beta-23516",
        "System.Linq": "4.0.1-beta-23516",
        "System.Threading": "4.0.11-beta-23516",
        "System.IO": "4.0.11-beta-23516"
      }
    }
  }

Now funny thing is I can run this just fine without a hitch of problems. Its like the Intellisense isn't correct. Any ideas as to why I am getting this red squiggly?

Jon Skeet
people
quotationmark

Although DirectoryInfo and FileInfo are in the System.IO namespace, in the DNX world they're in the System.IO.FileSystem assembly. So you need to add a dependency of:

"System.IO.FileSystem": "4.0.1-beta-23302"

people

See more on this question at Stackoverflow