1

In Visual Studio 2017, a fresh new Xamarin solution is created with Portable Class Library. enter image description here

A initial build shows success. But a run gives an error message: enter image description here

warnings like

Unable to add a reference to project 'App1'. The current project's target is not one of or compatible with the targets of Portable Library project 'App1'.

It is in both App1.iOS and App1.Android. enter image description here

I have not yet upgrade the Xamarin NuGet package yet. The UWP project can run without any warning or exception.

Look into the project reference on the Android project, we see the broken reference to App1. enter image description here

Trying to reference that PCL project again, I got

enter image description here

Look into the Property of the App1 PCL project,

enter image description here

What could be wrong? How can I fix the PCL project so it can be correctly referenced by Android and iOS projects?

Blaise
  • 21,314
  • 28
  • 108
  • 169

0 Answers0