Xamarin.Forms using shared project, and referencing a PCL. (Failed to resolve assembly)

Hi,
I am using Xamarin.Forms and have selected the "Shared Project".
In the solution I have added a new project, which is a PCL. I reference that PCL in Android/iOS/UWP projects.

I am trying to access an embedded resource (image) in the PCL, and referencing it via xaml using the "ImageResourceExtension".

It works when deploying to a real Android device, but when running it via "Xamarin Live Player", I get the exception:


The following errors were encountered when building and running your app:

• Failed to resolve assembly: 'Resources, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

I am using Android Xamarin Live Player 1.0.352.

Is such an issue addressed in the "Alpha Release: 1.0.402" (which I just subscribed to), or is this a new issue?

Perhaps it is wrong to use a PCL for the resources?

Thanks.
Martin

BTW: I think the "Xamarin Live Player" is going to be awesome.

Answers

  • Martin_BitProgressMartin_BitProgress DKMember

    When I use Xamarin.Forms and PCL (Not shared project), and embedding the image in the PCL, and accessing it via "ImageResourceExtension" in xaml, I get the error:

    "Object of type 'NInterpret.InterpretedObject' doesn't match target type 'Xamarin.Forms.Xaml.IMarkupExtension' (TargetException)"

    The exact same code works on a real android device.

  • BillyMartinBillyMartin USMember ✭✭

    I get the same error when I use a shared project with a plugin like internet or gps. Can't get PCL to work at all. Visualization errors.

  • JamesMontemagnoJamesMontemagno USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    What version of the app are you running? Those issues are addressed in 1.0.402+

  • NguynVanMNguynVanM USMember

    I get same error on iOS, appstore version is 1.0.253 but on Play Store is 1.0.507

  • JamesMontemagnoJamesMontemagno USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    I just pushed out a new version (1.2.80) to google play which now supports .NET Standard project types.

    For iOS the Test Flight Fast Ring version supports it as well.

Sign In or Register to comment.