Xamarin.Forms – InitializeComponent doesn’t exist when creating a new page

UPDATE:
This error doesn’t usually appear in VS 2015, if it does, here’s my original answer:

Found the solution!
Right click on the .XAML file, select Properties.

You will see a Property called Custom Tool. Change its value from MSBuild:Compile to MSBuild:UpdateDesignTimeXaml

This will solve the problem.
Dont know about the downvote, but here’s my screenshot:

Screenshot
UPDATE:

It reappears rarely. If it does, just open the Xaml and code behind files and save them. I know, its not the best solution, but it gets the job done.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)