Reasons to target legacy .NET platforms when choosing a PCL profile

I support a portable class library targeting the core .NET and Mono platforms. The main PCL uses profile 147 (.NET 4.03 + Windows Store + Silverlight 5 + Windows Phone 8), however, for some technical reasons, the NuGet package consists of three versions: core PCL (profile 147), .NET 4 and Silverlight 5. In practice, I could change the profile of the main PCL and replace .NET 4.03 with .NET 4.5 and abandon Silverlight 5. I do not do this if my library will be consumed from another PCL - for this reason I would like to use the widest PCL.

So my first question is: is this an assumption correct. For instance. even though I have a separate SL5 implementation, choosing a PCL profile with SL5 support makes it more convenient for PCL, for example. another PCL-oriented SL5 might reference my lib.

If this assumption is true, my next question is: is it worth it. Now that there is a popular PCL profile choice for developing Xamarin, none of them are targeting .NET 4. And the one that is recommended is profile 78, which is not intended for Silverlight. I did not find a detailed description of the consequences of not choosing these profiles, so I can’t understand what I’m losing by staying with profile 147. If there are known problems and unsupported features, I will certainly have a more modern profile, but as I wrote earlier , I would like, if possible, to configure a wider platform.

+4
source share
1 answer

This is a compromise between latitude and features. If profile targeting with Silverlight supports all the APIs you need or need, then stick with it. You have no choice to make, go to latitude. Excluding the cost of testing, it makes no sense to limit yourself or your consumers.

Silverlight ( ​​ , , Microsoft BCL Portability Pack), . - Portable Class Library , , / .

, , "Profile78" (.NET Framework 4.5, Windows 8, Phone 8, Xamarin.Android, Xamarin.iOS) (~ 45% ). . . , , , " ", , API , , (Silverlight,.NET Framework 4). : .NET Portable Subset (Legacy)?.

+2

Source: https://habr.com/ru/post/1535685/


All Articles