Typography icon indicating copy to clipboard operation
Typography copied to clipboard

Add .NET5 support

Open prepare opened this issue 6 years ago • 15 comments

The 3 main repositories (HtmlRender, PixelFarm, Typography) will be moved to .netcore3 and beyond

:)

prepare avatar Sep 28 '19 02:09 prepare

netcore3 is not a good idea. netcore3 does not support Xamarin.iOS/Xamarin.Android/UWP. netstandard2.0 is the right target, and will be until dotnet5.

charlesroddie avatar Oct 29 '19 18:10 charlesroddie

OK

C# 8 + netstandard 2.1

https://github.com/LayoutFarm/Typography/commit/73934c31e4b12e72093506b8bc82daae944a488a

prepare avatar Jun 30 '20 09:06 prepare

netstandard2.1 removes .net framework and uwp support so I would recommend netstandard 2.0 https://github.com/dotnet/standard/issues/1330

charlesroddie avatar Jun 30 '20 09:06 charlesroddie

Thank you! netstandard 2.0 + C#8 => OK , https://github.com/LayoutFarm/Typography/commit/e3437edfc8b5dfad9cf406e1e96b1376e21a72ae

:)

prepare avatar Jun 30 '20 11:06 prepare

@prepare I recommend using https://www.nuget.org/packages/Nullable/ for nullable annotation attributes for Nullable Reference Types and https://www.nuget.org/packages/System.Memory/ for using Span and friends in .NET Standard 2.0.

Happypig375 avatar Jun 30 '20 17:06 Happypig375

nullable -1 Span +1

zwcloud avatar Jul 01 '20 09:07 zwcloud

@zwcloud, please explain

nullable -1 Span +1

prepare avatar Jul 01 '20 10:07 prepare

This should be reopened as there are still netframework2 projects in this repo!

https://github.com/LayoutFarm/Typography/issues/191#issuecomment-658624831

.NET Framework 4.6.1 was introduced 5 years ago. What is the need to support older .net frameworks? It is bound to make this repo a huge mess.

charlesroddie avatar Jul 15 '20 08:07 charlesroddie

see : https://docs.microsoft.com/en-us/nuget/create-packages/multiple-target-frameworks-project-file

Why I need to support .net framework 2.0

I still need to maintenance it. My 'customers' (MANY) still need to use it in very old machine. OR they merge my code with their projects => must be built on .netframework 2.0

I want them to update but I can't at this time.

please understand me too :)

my long term plan=> move to .net5

prepare avatar Jul 15 '20 08:07 prepare

These users are still on XP? So they don't mind that they haven't updated their hardware for 11 years, haven't had OS feature updates for 12 years and security updates for 6 years so are blocked from accessing the internet, but they still want to receive updates from LayoutFarm?? You post these updates to them on floppy discs?

charlesroddie avatar Aug 17 '20 12:08 charlesroddie

Most of machines are Win7 (.net2.0-3.5) , behind corporation firewall, blocked from accessing to internet.

a very few numbers are WinXP.

They are replacing the old machine with the new Win10 machines.

prepare avatar Aug 17 '20 22:08 prepare

.NET5 WIP soon :)

prepare avatar Nov 18 '20 12:11 prepare

dotnet5 was scaled back so doens't support Android/iOS/UWP, with these plans pushed back to dotnet6. Regardless, a first step is to go netstandard2.0 only.

They are replacing the old machine with the new Win10 machines.

How is this process going?

charlesroddie avatar Nov 18 '20 13:11 charlesroddie

Regardless, a first step is to go netstandard2.0 only.

OK :)

They are replacing the old machine with the new Win10 machines.

The process will be finished about this December 2020. and I will remove old projects for .net2.0-3.5 in this December too.

prepare avatar Nov 19 '20 01:11 prepare

.Net 5 is compatible with .NetStandard2. Is there a reason to separate them? I. e. will this library benefit of .Net 5.0 APIs which are not available in .Net Standard 2.0?

If not, there is no reason to separately target .Net 5.

❌ AVOID multi-targeting as well as targeting .NET Standard, if your source code is the same for all targets.

The .NET Standard assembly will automatically be used by NuGet. Targeting individual .NET implementations increases the *.nupkg size for no benefit.

virzak avatar Mar 08 '21 23:03 virzak