Has anyone succeeded in opening the pre-release System.Collections.Immutable from NuGet in F#?
I'm getting this error:
The type 'IEnumerable`1' is required here and is unavailable. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Even though my project is .NET 4.5
Tried explicitly opening System.Runtime and that did not work either. I am referencing .NETCore\v4.5\System.Runtime.dll
This is a known issue that the relevant teams at Microsoft are investigating. In the meantime, here are the workaround steps:
- Create an F# Application project that targets .NET Framework 4.5
Install-Package Microsoft.Bcl.Immutable -pre- Add a reference to "%ProgramFiles%\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.dll"
- Add a reference to the System.ComponenModel.Composition.dll assembly from the Framework.
After that, early testing suggests F# works with the immutable collections just fine.
You can installed "System.Collections.Immutable" component from NuGet that will resolved your problem.
Have a look to the URL https://www.nuget.org/packages/Microsoft.Bcl.Immutable/
来源:https://stackoverflow.com/questions/14017219/pre-release-collections-immutable