Jeremy S Brown

Professional Learner with a Passion for Writing Software

Powered by Genesis

Note to Self: When Deploying a Web API project to Azure that references an F# project

May 16, 2015 by Jeremy Leave a Comment

Currently working on a project that is making use of F# to handle some wicked analytics. Everything works great locally, but when I deployed to Azure I got this lovely message.
Could not load file or assembly FSharp.Core

OK no big deal been down this road before with earlier versions of MVC. I just need to reference the assembly in the API project and make sure Copy Local is set to true.
FSharpCoreCopyLocal

However this did not solve the problem, because there is one more step. I needed to update the Web Config and add a dependent assembly reference to the runtime section.

Web Config Runtime Assembly Bindings
1
2
3
4
5
6
7
8
9
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <!-- Other Dependent Assembly Settings Here -->
  <dependentAssembly>
    <assemblyIdentity name="FSharp.Core" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0"/>
  </dependentAssembly>
  </assemblyBinding>
</runtime>

Still not a big deal, but something I know I’ll forget in the future so thought I would write about.

Filed Under: ASP.NET Web API, Azure, F#, Note To Self

Leave a Reply Cancel reply

You must be logged in to post a comment.