The mscorlib CLI core library is binary incompatible with the F # core library

I created a website that takes code snippets and compiles them and runs them. However, F # crashes on the server. Whenever I try to compile F # code, I get the following error message:

The default CLI core library "mscorlib" is binary incompatible with the F # base library C: \ Program Files (x86) \ Microsoft F # \ v4.0 \ FSharp.Core.dll '. Consider recompiling the library or explicitly pointing to the version This library, which corresponds to the version of the CLI used.

Error opening binary file 'C: \ Program Files (x86) \ Microsoft F # \ v4.0 \ FSharp.Core.dll': An exception of type 'Microsoft.FSharp.Compiler.ErrorLogger + ReportedError' was selected.

To be clear, this is an error returned by the compiler, and not an error that occurs when the code runs.

The site works fine on my development machine and works fine on the virtual machine I created to help diagnose the problem.

Google's only hit for the error message made me try to clear the F # /. NET installation to no avail. I performed a repair installation of the framework and uninstalled / reinstalled the F # packages that I use.

Example: http://dotnetpad.net/ViewPaste/ZvXBgizf70q83Fk6VmboHw

F # compilation code: http://bitbucket.org/gobiner/.net-pad/src/tip/DotNetPad/Compilers/FSharpCompiler.cs

+5
source share
3 answers

fsc.exe ? , -r -ing FSharp.Core 4.0, mscorlib 2.0. . Visual Studio, .

:

FSharp.Compiler.CodeDom VS2008 VS2010

+2

, .NET dev, , . - , , System.Environment.Version.

, , - .NET 3.5, .NET 2.0 - . , , .

0

Is your machine dev 32 or 64 bit? It looks like server 64, and therefore this can be a problem if they are different.

0
source

All Articles