Microsoft.Bcl.Immutable vs System.Collections.Immutable.Net40

What is the difference between these two NuGet packages? Should I use one over the other if I am building a .net 4.51 project? I've used the beta of Microsoft.Bcl.Immutable in the past, but just curious if anyone would be better than the other, or any pros and cons of using one over the other.

+3


source to share


1 answer


Microsoft only officially supports one version of the System.Collections.Immutable assembly, and it targets .NET 4.5 and newer (as a portable class library). The first (and currently the most recent) stable release of this library is version 1.0, and is released as a Microsoft.Bcl.Immutable NuGet package . The continuing development of this open source library is part of the System.Collections.Immutable project .

If you need to target older versions of .NET, you currently have two options.



  • System.Collections.Immutable.Net40 : This is the 1.0 reverse port for .NET 4.0. It does not include strong nodes and I am not sure about its current status.
  • Rackspace.Collections.Immutable : This is a multipurpose reverse port of the current version 1.1, currently falling back to .NET 3.5. These assemblies contain strong names, and the attribute [TypeForwardedTo]

    is used to release newer replacement targets. For example, the assembly for .NET 4.5 is 11 KB and forwards everything to the assembly System.Collections.Immutable; if you have code referencing Rackspace.Collections.Immutable in .NET 4.5, you can enable this stub and, at runtime, .NET 3.5 or 4.0 code will act as if it was built against 4.5.
+5


source







All Articles