title: "You must add a reference to assembly" compiler error in weird case
body: <p>I have two applications App1 and App2. App1 added a reference to App2 and App2 added a reference to <code>System.Drawing</code>.</p>
  
  <p>In App2 there's a function with two overloads, the first one is <em>protected</em> and has a parameter from <code>System.Drawing.Bitmap</code> and the second one is <em>public</em> has an integer parameter.</p>
  
  <pre><code>namespace App1Namespace
  {
      class Program
      {
          static void Main(string[] args)
          {
              App2Namespace.StaticClass.Func(4);
  </code></pre>
  
  <hr>
  
  <pre><code>namespace App2Namespace
  {
      public class StaticClass
      {
          protected static void Func(System.Drawing.Bitmap bitmapParam) { }
          public static void Func(int intParam) { }
  </code></pre>
  
  <p>When the App1 is built, the following compile time error will be thrown:</p>
  
  <blockquote>
    <p>Error 1   The type 'System.Drawing.Bitmap' is defined in an assembly
    that is not referenced. You must add a reference to assembly
    'System.Drawing, Version=4.0.0.0, Culture=neutral,
    PublicKeyToken=b03f5f7f11d50a3a'.</p>
  </blockquote>
  
  <p>Although <code>Func</code> which has <code>Bimap</code> param is protected, the App1 needs having a reference to <code>System.Drawing</code>. </p>
  
  <p>The questions are that why does App1 need <code>System.Drawing</code>? and why this error appears only when the second overload is called and doesn't appear when another overload (for example with two parameters) is called?</p>
  
  <p>Note: When the first overload becomes private the error will disappear.</p>