I am trying to create a new page to my solution but I can't run the emulator because when I try to build the app I get the error CS0103: The name 'InitializeComponent' does not exist in the current context.
I tried what is in this https://forums.xamarin.com/discussion/62671/initializecomponent-does-not-exist-in-the-current-context-error which basically says change the the "Build Action" to "Embeded Source". I tried it and the red squiggly line bellow the "Initialize Component" disappears but when i try to reference to that page for example when i want to open the page when a button is clicked I can't reference the page, the name doesn't come up with the intelliscence as it type the word "page1" an I get an error when i try to build the solution because it says " the type or namespace named page1 can not be found, are you missing using a directive or an assembly reference.
also another page suggests changing the page1.xaml build action to embeded source and making the page1.xaml.cs build action to compile. I can't do this because the page1.xaml doesn't get added to he solution explorer when I create a new page. so I can't select property and change the build action for page1.xaml.
also this page doesn't work because it is about wpf not xamarin. The name 'InitializeComponent' does not exist in the current context.
this link sais that the project runs fine although he has a red squigly line under the initialize component which isn't my case. https://github.com/UXDivers/Grial-UI-Kit-Support/issues/154
this one sais clean and rebuild solves the build erro but it is not true in my case. https://github.com/xamarin/Xamarin.Forms/issues/2863