Mapsui: What are the consequences of going to .NET Standard?

Created on 18 Oct 2017  路  7Comments  路  Source: Mapsui/Mapsui

This is a question to users of Mapsui.

At some point I need to upgrade to .NET Standard, maybe soon. What will the consequences for developers using Mapsui? How much needs to be changed on your side?

question

All 7 comments

I did some tests with the new csproj format and .NET Standard packages and I am inclined to make the move soon. This will be in a 2.0 version.

I found it useful to learn that it is possible to add PCLs to .NETStandard packages.

Steps:

  1. Create a .NET Standard class library.
  2. Install-Package Microsoft.NETCore.Portable.Compatibility to the new project
  3. Edit the csproj and add this line:
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wpa81</PackageTargetFallback>

Like this:

<PropertyGroup>
    <TargetFramework>netstandard1.4</TargetFramework>
 <PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wpa81</PackageTargetFallback>
</PropertyGroup>

Got this from:
https://montemagno.com/installing-a-pcl-into-netstandard-libraries/

Would probably be fine for me, I guess I'd have to try it out when it happens. As long as Xamarin supports the .NET Standard you're moving to, I should be good.

BTW, if you publish a prerelease NuGet with it, I'll try it out for you (although I won't be able to get back to you until the second half of November).

The main issue moving to .net standard is simply choosing the version to match the required back support. I.e .Net Standard 2.0 wouldn't support any version of windows prior to The Fall Creators version unless it is back ported. This means organisations that don't upgrade their machines to keep up with the latest would become unsupported.

The best thing to do is to only upgrade to the higher version when actually needing the API functionality of that higher version. I think .NetStandard 1.4 or lower is a good base point as it supports the Creators Update which I think is the majority of systems.

Good, that is specific. We will try to target .NET Standard 1.4. Since Mapsui is a low level PCL I expect just a few code changes.

It should be part of the move to Mapsui 2.0.

2.0.0-beta.2 has been released with the core assemblies as netstandard1.3.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricardoboss picture ricardoboss  路  5Comments

felipechavez picture felipechavez  路  4Comments

TheProme picture TheProme  路  4Comments

EduardsBrown picture EduardsBrown  路  5Comments

lukaszpitulski picture lukaszpitulski  路  8Comments