Current target framework configuration
<TargetFrameworks>netcoreapp3.1;netstandard2.0;netstandard2.1</TargetFrameworks>
Goal is to maintain compatibility to .NET Standard 2.0 to support .NET Framework 4.6.2 or higher
This requires conditional compilation depending on NETSTANDARD2_0
and NETSTANDARD2_1
.
CLR preprocessor symbols Target frameworks in SDK-style projects
Unity preprocessor symbols Unity Manual - Conditional Compilation
Mainly all all affected code is related to performance focused code using Span<>
's or ReadOnlySpan<>
's.
Majority of NETSTANDARD2_0
implementation is in Standard-Extensions.cs
Following nuget packages of BCL - Base Class Library - are required for TargetFrameworks: netstandard2.0 and netstandard2.1
System.ComponentModel.Annotations
Some implementation specific for netstandard2.0 require heap allocations.
These implementation are marked with
// NETSTANDARD2_0_ALLOC
GraphQL-Parser - nuget used by Fliox GraphQL uses:
<TargetFrameworks>netstandard2.0;netstandard2.1;net6</TargetFrameworks>
SIPSorcery - nuget used by Fliox WebRTC uses:
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net461;net5.0;net6.0;</TargetFrameworks>