aph5
aph5

Reputation: 791

F# Azure Worker Role and Target runtime

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:

Upvotes: 1

Views: 143

Answers (2)

Thraka
Thraka

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

David Crook
David Crook

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:

  1. Create a Cloud Service and Add a C# Worker Role
  2. Create an F# Library
  3. Add a reference to the C# worker role for the F# Library.

Solution View

enter image description here

Consuming the Library from C#

enter image description here

F# Library Definition

enter image description here

Upvotes: 4

Related Questions