title: CS0246 visual studio community edition 2015 missing reference?
body: <p>I have a &quot;windows 10 pro&quot; and a fresh install of &quot;visual studio community edition 2015&quot; installed.</p>
  <p>I do a new project console application and call it ftptest
  then copy and paste the code from here:</p>
  <p><a href="https://msdn.microsoft.com/en-us/library/ms229716%28v=vs.110%29.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/ms229716%28v=vs.110%29.aspx</a></p>
  <pre><code>using System;
  using System.IO;
  using System.Net;
  
  namespace ftpcheck
  {
      public class Program
      {
          public void Main(string[] args)
          {
              // Get the object used to communicate with the server.
              FtpWebRequest request = (FtpWebRequest)WebRequest.Create(&quot;ftp://www.contoso.com/&quot;);
              request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
  
              // This example assumes the FTP site uses anonymous logon.
              request.Credentials = new NetworkCredential(&quot;anonymous&quot;, &quot;janeDoe@contoso.com&quot;);
  
              FtpWebResponse response = (FtpWebResponse)request.GetResponse();
  
              Stream responseStream = response.GetResponseStream();
              StreamReader reader = new StreamReader(responseStream);
              Console.WriteLine(reader.ReadToEnd());
  
              Console.WriteLine(&quot;Directory List Complete, status {0}&quot;, response.StatusDescription);
  
              reader.Close();
              response.Close();
          }
      }
  }
  </code></pre>
  <p>And try to build it just to see what it does.</p>
  <p>I get a lot of:</p>
  <blockquote>
  <p>CS0246 The type or namespace name 'FtpWebRequest' could not be found
  (are you missing a using directive or an assembly reference?)</p>
  <p>CS0246    The type or namespace name 'NetworkCredential' could not be
  found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  <p>How can i add that missing reference?</p>