My project is PCL. now in shared code, I cannot upgrade skiasharp
Could not install package 'SkiaSharp 1.60.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.
If SkiaSharp dropped support for PCL then what should we do. should we re-start the 10,000 lines code project from scratch on .Net standard just to be able to upgrade a nugget package?
The world is moving towards .NET Standard, and away from PCL. Unfortunately, we can't always support everything, so something had to give.
The good news is that SkiaSharp support .NET Standard 1.3, so this really only excludes the wp8 and win8 platforms. https://docs.microsoft.com/en-us/dotnet/standard/net-standard
There is even more good news that the upgrade is not actually painful in most cases. The new project system is pretty good at getting the right things in. I have been doing this with many of my projects - no need for complex upgrades and other tools.
In fact, just open the .csproj in a text editor (such as VSCode/notepad/text edit) and then replace everything with:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="3.0.0.482510" />
</ItemGroup>
</Project>
That should probably get you started right away - but you may have to add your other NuGet references as well. If you attach/send me your .csproj and your packages.config, I can show you exactly what things should look like.
Hi,
this issue is affecting my projects too. I need to find a quick solution because I work for a company. Could you help me please? Thanks.
If you really need to support PCL, then the last version that supports it was v1.60.0. I conceptually removed PCL support with the v1.60.x series, but left it in for the first release so that any critical bugs in the old m59 series could be resolved.
We won't be adding PCL back, you will have to remain on the v1.60.0 release.
jawdrop just like that, screw all the projects that were depending on this library... wow, just... wow
@gmagana PCL has been deprecated and considered Legacy since July of last year:
https://github.com/MicrosoftDocs/xamarin-docs/commit/46bb04016d3c35d91ff434b38474e0cb8197961b#diff-37abf543ed880c4ccf4e8c9ce9d997bd
I personally wouldn't support PCL in anything I was maintaining either 🤷♂️