8
votes

I am writing a Portable Class Library(PCL) in my Xamarin platform and expecting to reuse that in UWP and .Net Core platform. So instead of writing as Portable class library (PCL), I should write as Standard Class Library ? So current version of Standard Library with VS2017 is 2.0 ?

2
Standard library 2.0 is in preview modeVMAtm
VS2017 currently only supports .NETCore 1.1 and .NETStandard 1.6 max. There is no future in PCL, but do wait a couple of months before doing anything drastic.Hans Passant

2 Answers

10
votes

Use .NET Standard; it is compatible with a wide range of frameworks - see compatibility grid. The current version used by VS2017 is 1.6, but you can target earlier versions of .NET Standard to support earlier versions of various frameworks.

5
votes

It is preferable to write it in .Net standard, since writing it your library in .Net standard, cause with .Net standard, you will have access to more packages which will be compatible with the library you are writing instead of using PCL, which will allow you to use packages which function only on some specific platforms. to have the finest details about .Net standard and PCL, and how to create a .Net standard library or moving from PCL to .Net standard, follow this awesome tutorial PCL and .Net standard with Xamarin also don't forget to view the Video at the end of the blog post.