locked
How do I get SkiaSharp to build now I have updated Xamarin RRS feed

  • Question

  • User172704 posted

    I have just been forced to get the latest Xamarin update (4.5.0.475) in Visual Studio 2015 because of the bug in yesterday's release (4.5.0.443). I have also updated Xamarin.Forms via nugget to V 2.3.4.247. I tried to update SkiaSharp to 1.58.0 at the same time but this now fails. Trying to go back to 1.57.1 also now fails with the same error message:

    Package 'SkiaSharp.Views.1.57.1 : SkiaSharp [1.57.1, )' does not exist in folder 'D:\Data\Work\Dev\Projects\Live\MyProject\packages' Could not install package 'SkiaSharp.Views 1.57.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

    As things stand, this is a show-stopper, so I'd be very grateful if anyone knows how I might be able to fix this.

    I am going to try getting a previous version of Xamarin.Forms, but my real question is: what are the 'normal' targets for a Xamarin.Forms project? I currently have: .NET Framework 4.5, ASP.NET Core 1.0, Windows 8, Windows Phone 8.1, Xamarin.Android, Xamarin.iOS, Xamarin.iOS (Classic), Xamarin.Mac.

    I was going to experiment with changing the .Net Framework to 4.5.1 or 4.6 but apparently I have to uninstall all nuget packages first. Before I proceed with this painful process, could anyone offer any advice about whether I am barking up the wrong tree here?

    Any help at all would be very gratefully received.

    Kind wishes ~ Patrick

    Wednesday, May 24, 2017 9:30 AM

Answers

  • User68536 posted

    Here is the GitHub issue: https://github.com/mono/SkiaSharp/issues/301

    The package that you are trying to install SkiaSharp.Views. That package is not meant to be installed into a PCL as that is platform-specific.

    For a PCL, you just need to install the SkiaSharp and SkiaSharp.Views.Forms packages. For each app project, you should be able to install the same, but then NuGet will automatically pull in the SkiaSharp.Views package as well.

    • SkiaSharp - the drawing engine
    • SkiaSharp.Views - the platform-specific UI elements
    • SkiaSharp.Views.Forms - Xamarin.Forms UI and types
    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, May 25, 2017 1:19 AM

All replies

  • User68536 posted

    Here is the GitHub issue: https://github.com/mono/SkiaSharp/issues/301

    The package that you are trying to install SkiaSharp.Views. That package is not meant to be installed into a PCL as that is platform-specific.

    For a PCL, you just need to install the SkiaSharp and SkiaSharp.Views.Forms packages. For each app project, you should be able to install the same, but then NuGet will automatically pull in the SkiaSharp.Views package as well.

    • SkiaSharp - the drawing engine
    • SkiaSharp.Views - the platform-specific UI elements
    • SkiaSharp.Views.Forms - Xamarin.Forms UI and types
    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, May 25, 2017 1:19 AM
  • User172704 posted

    @mattleibow I had recently managed to work that out for myself. Unfortunately never found the issue (need to brush up my search skills). Thank you for the help.

    • Patrick
    Thursday, May 25, 2017 7:05 AM