Could not load file or assembly 'FSharp.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Apr 12, 2011 at 7:07 PM

Hi,

When i run my application, with MCAPI.Net in my local machine, it works fine. However, when i host it on a shared hosting server, i get the following error.

Could not load file or assembly 'FSharp.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I understand that my hosting server is missing F# assemblies. So, i set "Copy Local" property of FSharp.Core reference to true, and published the code (and verified that FSharp.Core.dll is in bin directory). However, it is still not working. Throws the same error. Any suggestions to resolve this issue?

Thanks in advance.

Coordinator
Apr 12, 2011 at 8:48 PM
Edited Apr 12, 2011 at 8:51 PM
Hi,
I had the same problem :)
1) Try to install FSharp v2.0 (follow the link) on your host machine .
2) As far as i understand you try to make it work with your website. If so, add the next line to web.config:

<compilation defaultLanguage="c#" debug="true">
  <assemblies>
  <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  <add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
         ...
 <add assembly="FSharp.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>    
  </assemblies>
</compilation>

Let me know know if this helps!
Apr 14, 2011 at 10:31 AM

Hi denisk,

Thanks for the solution. It works :)