title: File class doesn't recognize Exists or CreateText methods
body: <p>A question relating to ASP.NET (4.5.1) MVC 4. I want to create a file and write a line into that file. To my understanding this is very easy i just do the following:</p>
  
  <pre><code>public static void Main() 
  {
      string path = @"c:\temp\MyTest.txt";
  
      if (!File.Exists(path)) 
      {
          // Create a file to write to. 
          using (StreamWriter sw = File.CreateText(path)) 
          {
             sw.WriteLine("Hello");
             sw.WriteLine("And");
             sw.WriteLine("Welcome");
          }   
      }
  
      // Open the file to read from. 
      using (StreamReader sr = File.OpenText(path)) 
      {
          string s = "";
  
          while ((s = sr.ReadLine()) != null) 
          {
              Console.WriteLine(s);
          }
      }
  }     
  </code></pre>
  
  <p>But when i call the File class it won't work. It does not know the methods Exists, CreateText.
  I don't understand it i did import <code>System.IO</code>. So what is the problem?</p>
  
  <p>UPDATE</p>
  
  <p>Found the solution in my project i imported <code>System.IO</code> and <code>System.Web.MVC</code>.
  The solution is to call the File class with the full path like so:</p>
  
  <pre><code>if (!System.IO.File.Exists(path)) 
      {
          // Create a file to write to. 
          using (StreamWriter sw = System.IO.File.CreateText(path)) 
          {
             sw.WriteLine("Hello");
             sw.WriteLine("And");
             sw.WriteLine("Welcome");
          }   
      }
  </code></pre>