title: The name 'InitializeComponent' does not exist in the current context(c#,xamarin)
body: <p>I just downloaded Visual Studio and created a new Xamarin.Forms project. However, when building the app with the auto-generated code I got stuck on the following error in the code-behind of MainPage.xaml:</p>
  <p><code>The name 'InitializeComponent' does not exist in the current context</code></p>
  <p>I looked up solutions on the internet but did not find one that works for me.
  What I tried:</p>
  <ul>
  <li><p>Changing the custom tool in the properties of MainPage.xaml (which was empty beforehand)</p>
  </li>
  <li><p>I checked if the namespaces match (they do)</p>
  </li>
  <li><p>I tried saving all the files</p>
  </li>
  </ul>
  <p>Here is an image of the auto-generated code, which I didn't edit:
  <a href="https://i.stack.imgur.com/67AQ4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/67AQ4.png" alt="MainPage.xaml and MainPage.xaml.cs" /></a></p>