I\'m trying to deploy a web application which uses F# 4.0 on Windows Server 2008.
It works on my computer where VS2010 is installed but it doesn\'t work on the serve
Just for anybody stumbling upon this after updating to VS 2019:
In my case, I have a C# console app that references an F# class library. All is good in VS 2017 but in VS 2019 I suddenly get such assembly loading errors (for FSharp.Core v4.7.0).
The reason behind the issue was that the FSharp.Core DLL somehow didn't get copied to the bin folder of the console app (though IMO it should, but it doesn't bother VS 2017). Since there is no copy local or similar option for a NuGet package I just added it to the console app as well. Not nice, but works.
I had the same problem and got it working by:
Just install this: Microsoft Visual Studio 2010 F# Runtime 2.0 on the server
http://www.microsoft.com/en-us/download/details.aspx?id=13450
I managed to get it working by installing FSharpRedist2.0 from VS2010 installer. It's located at \WCU\FSharp.
You need to install the redist (F# runtime) on the deployment machine. See e.g.
http://msdn.microsoft.com/library/ee241127(VS.100).aspx (or http://msdn.microsoft.com/en-us/library/ee829875.aspx)
for info on how to have a VS project chain the installer. As you've found, the redist (located here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=5f0a79f8-925f-4297-9ae2-86e2fdcff33c&displaylang=en
) needs to be installed; FSharp.Core is not part of .NET, rather it is a separately installed component.
I needed version 4.0.0
of FSharp.Core
, so I installed it in my Visual Studio 2010 via Nuget:
http://nuget.org/packages/FSharp.Core
Or run the following command in the Package Manager Console:
PM> Install-Package FSharp.Core
Then publish the project and upload FSharp.Core.dll