FSharp Library and FSharp.Core

A coworker was deploying NLogCassandra, a F# library that I wrote, to Azure. Once up there we noticed we were not getting any data in the logs. We also found a System.FileNotFoundException error in the azure logs. At first we thought it was a config file not being loaded correctly or something. After eliminating those possibilities I took a wild guess. Our machines are all dev machines and we had all the F# libraries installed into the GAC. This allows the FSharp.Core.dll to load fine.

works on my machine starburst

The Azure worker role machines do not have that library. So I copied the FSharp.Core.dll up to the bin on the Azure worker role and boom it worked!

Although this worked and we could just add the library and set CopyLocal = True I didn't like this too much. It means we have to install fsharp libraries on the build server too.

Nuget to the rescue. There is a package called FSharp.Core! I added it to my project and as a dependency on my nuget package and all is right with the world again!

When the build server pulls in the NLogCassandra nuget package it also pulls in the FSharp.Core package and deploys it to Azure. I think from now on I am just going to download this package from the start any time I create an FSharp library.