I've added NuGet package for Mailchimp in my project (http://mcapinet.codeplex.com/) this package has dependence on FSharp.Core, so it has been added as reference when I installed package, on my local machine (and with Azure Emulator) everything works fine, but when I published my Cloud Service on Azure (note: I'm using Continuous deployment with Visual Studio Online) I got this error when I went to website:
Could not load file or assembly 'FSharp.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
And FSharp.Core's property "Copy local" is set to True.
How can I solve this ?
EDIT
During my deployment I can see this warning:
The project 'Interface.Web' is dependent on the following assembly: C:\a\src\TFS\packages\FSharp.Core.4.0.0\lib\FSharp.Core.dll. This assembly is not in the package. To make sure that the role starts, add this assembly as a reference to the project and set the Copy Local property to true
I have fixed this issue by referencing the latest FSharp.Core - 4.3.1.0 and setting Copy Local to 'True'.
Then add this code to your web.config anywhere between the
<configuration></configuration>
tags to bind all older versions to the new assembly.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<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>
The dll should then be build and your error should be removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With