Chasm.Compatibility
2.6.2
dotnet add package Chasm.Compatibility --version 2.6.2
NuGet\Install-Package Chasm.Compatibility -Version 2.6.2
<PackageReference Include="Chasm.Compatibility" Version="2.6.2" />
paket add Chasm.Compatibility --version 2.6.2
#r "nuget: Chasm.Compatibility, 2.6.2"
// Install Chasm.Compatibility as a Cake Addin #addin nuget:?package=Chasm.Compatibility&version=2.6.2 // Install Chasm.Compatibility as a Cake Tool #tool nuget:?package=Chasm.Compatibility&version=2.6.2
Chasm.Compatibility
Provides a bunch of compatibility stuff, polyfills and shims.
Uses officially provided packages when possible, and uses its own when official ones aren't available.
Chasm.Compatibility
extends support down to netcoreapp1.0
, netstandard1.0
and net35
.
DO NOT use this for other packages!
[!CAUTION]
But if, for some reason, you need to, make sure you're targeting the same framework versions as this package!
Otherwise, your users may end up with ambiguous type reference errors!For example:
Your package targets Standard 2.0, and uses this package's target for Standard 2.0, which polyfillsAllowNullAttribute
(that was introduced in Standard 2.1). Then, the user of your package targets Standard 2.1 (which already has anAllowNullAttribute
) and uses your library for Standard 2.0, which in turn references this package (with polyfilledAllowNullAttribute
).
How does this compare to PolySharp?
PolySharp only polyfills types that are actually used (which is a good thing) and puts them in the project's own DLL file. But it doesn't work well in multi-project setups, with <InternalsVisibleTo>
exposing one project's PolySharp generated files to another, causing ambiguous type errors.
Chasm.Compatibility, on the other hand, includes all of the types in a separate DLL. Nothing fancy, but it works fine with multiple projects, as long as you're careful with their targets.
Compatibility Table
<table> <thead> <tr> <th rowspan="2">Features</th> <th rowspan="2">Compatibility type</th> <th colspan="3">Framework support</th> </tr> <tr> <th>.NET / .NET Core</th> <th>.NET Standard</th> <th>.NET Framework</th> </tr> </thead> <tbody>
<tr>
<td rowspan="3">
<code>System.ValueTuple</code>
</td>
<td>Core libraries</td>
<td><code>netcoreapp2.0</code></td><td><code>netstandard2.0</code></td><td><code>net47</code></td>
</tr>
<tr>
<td>Official packages</td>
<td><code>netcoreapp1.0</code></td><td><code>netstandard1.0</code></td><td><code>net45</code></td>
</tr>
<tr>
<td>Chasm.Compatibility</td>
<td><code>netcoreapp1.0</code></td><td><code>netstandard1.0</code></td><td><code>net35</code></td>
</tr>
<tr><td colspan="5"></td></tr>
<tr>
<td rowspan="4">
<code>System.Index</code> and <code>System.Range</code>
</td>
<td>Core libraries</td>
<td><code>netcoreapp3.0</code></td><td><code>netstandard2.1</code></td><td>—</td>
</tr>
<tr>
<td>Official packages</td>
<td>—</td><td>—</td><td>—</td>
</tr>
<tr>
<td>IndexRange package</td>
<td><code>netcoreapp2.0</code></td><td><code>netstandard2.0</code></td><td><code>net35</code></td>
</tr>
<tr>
<td>Chasm.Compatibility</td>
<td><code>netcoreapp1.0</code></td><td><code>netstandard1.0</code></td><td><code>net35</code></td>
</tr>
<tr></tr>
<tr><td colspan="5"></td></tr>
<tr>
<td rowspan="4">
<code>System.Runtime.CompilerServices.Unsafe</code>
</td>
<td>Core libraries</td>
<td><code>netcoreapp3.0</code></td><td>—</td><td>—</td>
</tr>
<tr>
<td>Official packages (v6)</td>
<td><code>netcoreapp2.0</code></td><td><code>netstandard2.0</code></td><td><code>net461</code></td>
</tr>
<tr>
<td>Official packages (v5)</td>
<td><code>netcoreapp1.0</code></td><td><code>netstandard1.0</code></td><td><code>net45</code></td>
</tr>
<tr>
<td>Chasm.Compatibility</td>
<td><code>netcoreapp1.0</code></td><td><code>netstandard1.0</code></td><td><code>net35</code></td>
</tr>
<tr></tr>
<tr><td colspan="5"></td></tr>
<tr>
<td rowspan="3">
<code>System.HashCode</code>
</td>
<td>Core libraries</td>
<td><code>netcoreapp2.1</code></td><td><code>netstandard2.1</code></td><td>—</td>
</tr>
<tr>
<td>Official packages</td>
<td><code>netcoreapp2.0</code></td><td><code>netstandard2.0</code></td><td><code>net461</code></td>
</tr>
<tr>
<td>Chasm.Compatibility</td>
<td><code>netcoreapp1.0</code></td><td><code>netstandard1.0</code></td><td><code>net35</code></td>
</tr>
</tbody> </table>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 is compatible. netcoreapp1.1 is compatible. netcoreapp2.0 is compatible. netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.0 is compatible. netstandard1.1 is compatible. netstandard1.2 was computed. netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net35 is compatible. net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 is compatible. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Windows Phone | wp8 was computed. wp81 was computed. wpa81 was computed. |
Windows Store | netcore was computed. netcore45 was computed. netcore451 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 1.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Microsoft.NETCore.App (>= 1.0.5)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETCoreApp 1.1
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Microsoft.NETCore.App (>= 1.1.2)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETCoreApp 2.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
-
.NETCoreApp 2.1
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
-
.NETCoreApp 3.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
-
.NETFramework 3.5
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Chasm.Compatibility.Unsafe (>= 2.0.1)
- Chasm.Compatibility.ValueTuple (>= 2.2.2)
-
.NETFramework 4.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Chasm.Compatibility.Unsafe (>= 2.0.1)
- Chasm.Compatibility.ValueTuple (>= 2.2.2)
-
.NETFramework 4.5
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.6.1
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.7
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
-
.NETStandard 1.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- NETStandard.Library (>= 1.6.1)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 1.1
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- NETStandard.Library (>= 1.6.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 1.3
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.HashCode (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- NETStandard.Library (>= 1.6.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
- Chasm.Compatibility.IndexRange (>= 2.2.2)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
-
.NETStandard 2.1
- Chasm.Compatibility.Attributes (>= 2.1.2)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
-
net5.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
-
net6.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
-
net7.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
-
net8.0
- Chasm.Compatibility.Attributes (>= 2.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.