title: VS2015: The type 'XXX' is defined in an assembly that is not referenced
body: <p>I have a web forms project which I've just ported to VS2015.</p>
  
  <p>On the Master Page, I have the following public method which sets a response message:</p>
  
  <pre><code>public void SetResponse(string responseMessage, Utilities.ResponseType cssClass)
  {
      ResponseToUser.Text = !String.IsNullOrWhiteSpace(responseMessage) ? Utilities.GetResponse(responseMessage, cssClass) : "";
  }
  </code></pre>
  
  <p>In the Utilities.cs file, I have the enum and the GetResponse:</p>
  
  <pre><code>namespace WEB
  {
      public class Utilities
      {
          public enum ResponseType
          {
              Success,
              Info,
              Warning,
              Danger
          }
  
          public static string GetResponse(string message, ResponseType response)
          {
              return "&lt;div id=\"response\" class=\"alert alert-" + response.ToString().ToLower() +
                 " fade in\"&gt;&lt;a href=\"#\" class=\"close\" data-dismiss=\"alert\"&gt;&amp;times;&lt;/a&gt;" + message + "&lt;/div&gt;";
          }
      }
  }
  </code></pre>
  
  <p>In the child pages, I make calls to the public method on the master page, like so:</p>
  
  <pre><code>if (Request.QueryString["msg"] == "changepassword")
      Master.SetResponse("Please change your password before continuing", Utilities.ResponseType.Warning);
  </code></pre>
  
  <p>VS2015 is showing the <code>Master.SetResponse</code> as an error, saying: </p>
  
  <pre><code>CS0012 The type 'Utilities.ResponseType' is defined in an assembly that is not referenced. You must add a reference to assembly 'App_Code.pay9mvri, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/JKst1.png" alt="error as shown"></p>
  
  <p>At the top of the child page, I have the reference to the Utilities namespace:</p>
  
  <pre><code>using WEB;
  </code></pre>
  
  <p>So the <code>ResponseType</code> enum IS in a referenced namespace. Why is it highlighting it as an error? The website still builds and runs fine, but I'd like to get rid of all the error messages. This wasn't an issue in VS2013 - the exact same project.</p>