title: The class XXX can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file
body: <p>I have this class and internal class as part of a namespace, like this (Just removed and replaced some code and namespace declarations:</p>
  
  <pre><code>namespace X.Y.MessageHandlers.AsxActivity
  {
      public class AsxActivityAliveEventMessageHandler : IHandleMessages&lt;AsxActivityAliveEvent&gt;
      {
          private const double INTERVAL = 10000;
          public static bool AsxConnected { get; set; }
          private static Dictionary&lt;String, TagTimer&gt; _connectionTimers = new Dictionary&lt;string, TagTimer&gt;();
  
          public void Handle(AsxActivityAliveEvent message)
          {
                ...
          }
  
          void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
          {
                ...
          }
  
          static void NotifyClients(AsxActivityAliveEvent message)
          {
                ...
          }
      }
  
      internal class TagTimer : Timer
      {
          public object Tag { get; set; }
      }
  }
  </code></pre>
  
  <p>Whenever I double-click my "AsxActivityAliveEventMessageHandler.cs" from the solution explorer, Visual studio pops up a window I've never seen before that gives me
  the following message: </p>
  
  <blockquote>
    <p>To prevent possible data loss before loading
    the designer, the following errors must be resolved:</p>
  </blockquote>
  
  <p>This is followed by this explanation:</p>
  
  <blockquote>
    <p>The class TagTimer can be designed, but is not the first class in the
    file. Visual Studio requires that designers use the first class in the
    file. Move the class code so that it is the first class in the file
    and try loading the designer again.</p>
  </blockquote>
  
  <p>Tried changing the class TagTimer from internal to public to private, but error does not seem do budge. Am I missing something here?</p>