title: Page doesn't contain a definition for X
body: <p>During development I had a <code>TempTextBlock</code> for testing and I've removed it now. It builds successfully, but when I try to create a package for store, it gives this error:</p>
  
  <blockquote>
    <p>error CS1061: 'MainPage' does not contain a definition for
    'TempTextBlock' and no extension method 'TempTextBlock' accepting a
    first argument of type 'MainPage' could be found (are you missing a
    using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>In <code>MainPage.g.cs</code> I see this:</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Connect()
  /// &lt;/summary&gt;
  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 14.0.0.0")]
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public void Connect(int connectionId, object target)
  {
      switch(connectionId)
      {
      case 1:
          {
              this.TempTextBlock = (global::Windows.UI.Xaml.Controls.TextBlock)(target);
          }
          break;
      default:
          break;
      }
      this._contentLoaded = true;
  }
  </code></pre>
  
  <p>So <code>TempTextBlock</code> is used there. If I remove the whole method, it gives this error:</p>
  
  <blockquote>
    <p>error CS0535: 'MainPage' does not implement interface member
    'IComponentConnector.Connect(int, object)'</p>
  </blockquote>
  
  <p>What's that <code>Connect</code> method in <code>MainPage.g.cs</code> and how to resolve this issue? thanks.</p>