CS1503 Xamarin.Forms.Application error

While adding a UWP app an error might be encountered as CS1503:Cannot convert from [type] to type Xamarin.Forms.Application for UWP'. Just make sure to use the correct App class.

I encountered this error when I added a new UWP project to my existing Xamarin Forms solution and tried building it.

My solution was created using Xamarin Studio on Mac some time ago. Xamarin Studio created the App class in a Forms.cs file in the portable Xamarin.Forms project. This confused me that App class even exists. When I tried to create a UWP project using Visual Studio on Windows I came across this error.

I was following the Xamarin Forms help site to create a UWP app where it is not mentioned. The solution is simple enough, just use the App object from the portable library instead of the UWP library in LoadApplication() method.

This issue will not arise when the solution is created using latest Visual Studio.


See in action here:

BLOG
CS1503 Xamarin.Forms.Application UWP Xamarin Forms

Dialogue & Discussion