fasi fasi - 1 month ago 7
Android Question

Sample code issue xamarin forms quick start

I am new to mobile development. For this i am practicing on xamarin forms and following this sample code. But there are some issues in it which i couldn't understand.

First is that there is no

Mainpage.xaml
file in the solution, i have to add it manually like bellow image

enter image description here

Further more in sample code they said to copy paste
app.xaml.cs
code into my solution file with same name. But there is no such file named like this as also shown in the above image. But i do have
app.cs
file so i copy pasted that code into this file and i get the following error

Moreover when i run it i get a following message

I have searched many articles on this but couldn't find the right answer

Any help would be highly appreciated

enter image description here

enter image description here

Answer

Kindly check when you add a new project you should use Blank Xaml App you would be choosing Blank App only. Look into the sample code it's mentioned in it and this will solve your problem.

Moreover you would have to select the appropriate Setup Start Project to view your result. If you want to view in android only then set it as Set as a startup project.

Hope it will solve your problem.

Comments