ThinkGeo.com    |     Documentation    |     Premium Support

Linking error when buildig for iOS release

Can’t resolve the reference ‘SkiaSharp.SKData SkiaSharp.SKBitmap::Encode(SkiaSharp.SKEncodedImageFormat,System.Int32)’, referenced from the method ‘ThinkGeo.Core.GeoImage LxQ=.WhQ=::VxQ=(ThinkGeo.Core.GeoImage,System.Collections.Generic.Dictionary`2<ThinkGeo.Core.GeoColor,ThinkGeo.Core.GeoColor>)’ in ‘SkiaSharp, Version=1.68.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756’.

When building for debug I don’t get this issue – Don’t link vs link framework sdks is the difference there.
Project is set up as a Xamarin forms project using the latest VS2019 project format with the latest stable v 12 of thinkgeo. If need be I can try and set up a sample project for this.

I manually added version 1.68.3 to my project to get around this issue – simply looks like your skiaSharp dependency is too low.

Thanks Richard,
For some reason the VS may not copy the skiasharp dependency to the debug folder. You could manually copy the file from the nuget folder.

C:\Users[UserName].nuget\packages\thinkgeo.dependency.skiasharp\12.2.1\lib\Xamarin.iOS

Or you could remove all thinkgeo related nuget and re-add them. and build the project again.

Go ahead let us know if this is help.

Thanks

Frank

Tried this again when switching back to v12 – and ran into the same compilation issue. Issue is not that skiaSharp v12.2.1 is missing – it is present. Issue is that it is looking for the wrong version of skiaSharp – its looking for version 1.68.0.0 as noted in the first message. This problem only occurs when building for release and not debug. Basically the “link Framework Sdks Only” option vs “Don’t link” under the build options. As noted above directly linking that version of SkiaSharp gets past this issue and things appear to work correctly but having multiple references to different versions of the same package is likely problematic.

Can be duplicated by using code included here
https://community.thinkgeo.com/t/requestdrawing-not-redrawing-layer/9886
Also can be done with the new howdoIsample for the forms implementation

Thanks Richard,
Could you help understand this issue. I download the howdoi sample from https://gitlab.com/thinkgeo/public/thinkgeo-mobile-maps/-/tree/master/samples/xamarin-forms

Then I open the solution with visual studio(mac version). Then debug it. It works fine.

Is there any more steps I need do to re-produce this issue?

Thanks

Frank

I am using visual studio for windows 2019. Apparently I was wrong about the howdoiSample – I could have sworn I ran into it with that as well. The test case I generated and referenced above shows this issue.

Thanks Richard,
I saw this issue once with visual studio 2019 windows 10. After I clean the solution and rebuild the project. The error gone. Could you try that?

Thanks

Frank

Not sure about the test case I provided but in our actual product clean does not change anything – even went as far as removing obj/bin directories manually and that had no impact either.

I have not tried moving project to mac and building through VS there for release.

Thanks Richard,
I think we could schedule a gotomeeting or room session to trouble shot the issue. Let us know if that work for you.

Thanks
Frank

That would be fine, but realistically it’s not high on my priorities list as I do have a workaround for this issue.

Thanks Richard,
Go ahead let us know if you want to schedule a meeting any time when you want.

Thanks

Frank

We switched back to v10 for the time being.

Thanks Richard,
We will keep eyes on this one.

Thanks

Frank