Reputation: 791
I'm using the latest Azure SDK 2.7 and when I create new Cloud Service and add F# worker role, then Im unable to change target runtime. Its set to F# 3.1 / FSharp.Core 4.3.1
Is there any trick how can I use F# 4.0 for worker roles?
SOLUTION:
In order to make your F# WorkerRole work with other F# libs which were compiled against different F# version, do the following:
remove FSharp.Core dependency from your worker role project (Target Runtime will be set then to N/A)
add assembly redirect
assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0"
Upvotes: 1
Views: 143
Reputation: 2164
Change the target by replacing the DLL reference in your project from 4.3.1 to 4.4.0.
You'll notice that the target combo box in the project references just reads whatever this DLL version is set to. I tried this and the compute emulator ran everything fine.
You may need to install the latest .NET runtime on your cloud service according to this tutorial.
Upvotes: 1
Reputation: 2730
What I often find is that F# interaction with architectural components has a tendency to lag behind. To resolve this, I always wrap my F# components with C#.
I look at C# as my architectural glue while F# does the real work:
Solution View
Consuming the Library from C#
F# Library Definition
Upvotes: 4