Working with F# 5 nodes

I was having some issues loading nodes from an F# assembly. It worked OK to begin with, but then after a save and restart, would get crashes on load. From what I gather, this is because vvvv bundles FSharp.Core DLL v 4.4.0, whilst I had .NET 5 SDK with FSharp.Core 5.0.0, and .NET projects pick up the latest installed SDK unless otherwise specified.
image

Fortunately, there is binary compatibility between FSharp.Core versions (link).

This means as a workaround, we can manually update the DLLs in the vvvv install’s lib folder, and update the binding redirect.

(Make a back up of the original files mentioned, just in case.)

  1. Copy FSharp.Core.dll from
    %UserProfile%.nuget\packages\fsharp.core\5.0.0\lib\netstandard2.0
    To
    C:\Program Files\vvvv\vvvv_gamma_{your_version}\lib

  2. Then, update the binding redirect in
    C:\Program Files\vvvv\vvvv_gamma_{your_version}\vvvv.exe.config"

Under
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />, change <bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" /> to
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />

Note:
I’ve only tried this with a very simple project, it’s possible this might affect existing projects in unintended ways - take care if you’ve got other 3rd party dependencies.

hello luke,

thanks for spotting this. we have that in there because we use FsPickler for binary serialization. It seems their packages run fine with FSharp.Core 5.0.

I’ve updated the reference and upcoming previews will come with that version.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.